Skip to content
Snippets Groups Projects
Commit 0f772b2a authored by Todor Kondić's avatar Todor Kondić
Browse files

norm_path: Stop it from complaining about non-existing paths when path = "".

parent 7b1935f7
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,13 @@
the_ifelse <- data.table::fifelse
dtable <- data.table::data.table
norm_path <- function(...) normalizePath(...,winslash='/')
norm_path <- function(...) {
test = nchar(...) > 0L
res = character(length(test))
res[test] = normalizePath(...[test],winslash='/')
res[!test] = ...[!test]
res
}
tab2file<-function(tab,file,...) {
data.table::fwrite(x=tab,file=file,...)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment