Skip to content

Commit

Permalink
fix: paths for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed May 17, 2024
1 parent 9abb4ec commit 8527d64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/MsBackendMzR.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,12 @@ setMethod("dataStorageBasePath", "MsBackendMzR", function(object) {
setReplaceMethod(
"dataStorageBasePath", "MsBackendMzR", function(object, value) {
ds <- dataStorage(object)
ds <- gsub("\\", "/", ds, fixed = TRUE)
value <- gsub("\\", "/", value, fixed = TRUE)
cp <- common_path(ds)
ds <- sub(cp, value, ds, fixed = TRUE)
if (!all(file.exists(unique(ds))))
stop("Provided path does not contain all data files.")
dataStorage(object) <- ds
dataStorage(object) <- normalizePath(ds)
object
})

0 comments on commit 8527d64

Please sign in to comment.