Dean Attali
2018-Jun-29 06:07 UTC
[Rd] Bug in tools::md5sum - does not work when filepath contains tilde (ie home directory)
I've reproduced on ubuntu and winodws with R3.4.3 When the filepath contains a tilde, the result is NA. But if the file path is expanded then the function works. Example: tools::md5sum("~/.Rprofile") returns NA tools::md5sum(normalizePath("~/.Rprofile")) returns the proper md5 Perhaps this is expected behaviour because the documentation does say NA is returned for unreadable files, but I didn't think "~" would make a file unreadable to the function. [[alternative HTML version deleted]]
Gabe Becker
2018-Jun-29 12:36 UTC
[Rd] Bug in tools::md5sum - does not work when filepath contains tilde (ie home directory)
Dean, I filed a patch for this in bugzilla yesterday so depending on reception this should be fixed in devel soon. Best, ~G On Fri, Jun 29, 2018, 3:58 AM Dean Attali <daattali at gmail.com> wrote:> I've reproduced on ubuntu and winodws with R3.4.3 > > When the filepath contains a tilde, the result is NA. But if the file path > is expanded then the function works. > > Example: > tools::md5sum("~/.Rprofile") returns NA > tools::md5sum(normalizePath("~/.Rprofile")) returns the proper md5 > > > Perhaps this is expected behaviour because the documentation does say NA is > returned for unreadable files, but I didn't think "~" would make a file > unreadable to the function. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]
Apparently Analagous Threads
- Suggestion/opinions: add a `absolute` param to `normalizePath()` to force returning an absolute path
- Bug in print.default: dispatches to global show instead of methods::show
- Defining a `show` function breaks the print-ing of S4 object -- bug or expected?
- live migration of winodws based domUs
- Suggestion/opinions: add a `absolute` param to `normalizePath()` to force returning an absolute path