Skip to content

Commit

Permalink
do not change workdir recursively, allow annotation datasets and reso…
Browse files Browse the repository at this point in the history
…urces etc to have different workdirs
  • Loading branch information
proycon committed Aug 29, 2024
1 parent ab20482 commit 098b673
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/annotationstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2091,8 +2091,8 @@ impl AssociatedFile for AnnotationStore {
debug(self.config(), || {
format!("AnnotationStore.set_filename: workdir={:?}", workdir)
});
let workdir = &workdir;
self.update_config(|config| config.workdir = Some(workdir.clone()));
self.config.workdir = Some(workdir.clone());
//self.update_config(|config| config.workdir = Some(workdir.clone()));
}
}

Expand Down
8 changes: 7 additions & 1 deletion src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ pub(crate) fn open_file(filename: &str, config: &Config) -> Result<File, StamErr
/// Auxiliary function to help open files
pub(crate) fn create_file(filename: &str, config: &Config) -> Result<File, StamError> {
let found_filename = get_filepath(filename, config.workdir())?;
debug(config, || format!("create_file: {:?}", found_filename));
debug(config, || {
format!(
"create_file: {:?}, workdir: {:?}",
found_filename,
config.workdir()
)
});
File::create(found_filename.as_path()).map_err(|e| {
StamError::IOError(
e,
Expand Down

0 comments on commit 098b673

Please sign in to comment.