Closed SHAESEN2 closed 1 year ago
@SHAESEN2 Not sure if I can reproduce this... Could you please share a minimal reproducible example? Maybe there a better way to create the file collection in the first place.
Matching files with \\.RData$
and some others without the starting /
in the sanitizer patterns will have some unintentional side effects.
Since there is no response on a minimal reproducible example, I'm closing this issue.
The above is a minimal example.
grepl("/\.git", ".git/blah") # trying to remove the .git folder but this does not work FALSE grepl("/\.git", "/.git/blah") # it failed above because . git was in the absolute folder TRUE
Since we can't use the above function, we are forced to sanitize the collection ourselves with custom functions.
I was trying to remove some folders before packing but ran into issues. Then I realized you make the assumption that the files are already residing in a subfolder.
It would be more intuitive (at least to me) to not make assumptions and change the pattern to below so the function finds all files: