remake icon indicating copy to clipboard operation
remake copied to clipboard

File paths and platform independence

Open wlandau opened this issue 9 years ago • 2 comments

In target_is_file() (parse_command.R line 240), I think

is_file <- grepl("/", x, fixed=TRUE)

should probably be replaced by

is_file <- grepl(.Platform$file.sep, x, fixed=TRUE)

to ensure platform independence. I have not checked for more occurrences of "/".

wlandau avatar Sep 14 '16 12:09 wlandau

I'm not totally sure about that; "/" in a path works on both windows and OSX/Linux but "" works only on Windows; so a project that has "" in it will never work cleanly on a non-Windows system.

But on the other hand I can see your point...

richfitz avatar Sep 14 '16 15:09 richfitz

My mistake, I had not actually tested this on Windows.

wlandau avatar Sep 14 '16 16:09 wlandau