From 4a68369c331ccd36440da5aedc2cebc38c7e345a Mon Sep 17 00:00:00 2001 From: muschellij2 Date: Mon, 27 May 2019 23:19:43 -0400 Subject: [PATCH] added the normalization --- R/robex.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/robex.R b/R/robex.R index 011003f..d15fcdd 100644 --- a/R/robex.R +++ b/R/robex.R @@ -41,9 +41,10 @@ robex = function( xinfile = infile infile = shQuote(infile) xoutfile = outfile - outfile = file.path( - tools::file_path_as_absolute(dirname(outfile)), - basename(outfile)) + outfile = path.expand(outfile) + outfile = normalizePath(outfile, "/") + outfile = file.path(normalizePath(dirname(outfile), "/"), + basename(outfile)) if (.Platform$OS.type == "windows") { outfile = gsub("\\", "/", outfile, fixed = TRUE) outfile = gsub("/+", "/", outfile)