From tom@@@k@||ber@ @end|ng |rom gm@||@com  Tue Jan 29 12:18:11 2019
From: tom@@@k@||ber@ @end|ng |rom gm@||@com (Tomas Kalibera)
Date: Tue, 29 Jan 2019 12:18:11 +0100
Subject: [Rd] Bug or undocumented behavior in normalizePath() with file
 system links on windows
In-Reply-To: <OF48B62599.D79E0C5C-ONC125838C.0050BE06-C125838C.0051A286@domino.offis.uni-oldenburg.de>
References: <OF48B62599.D79E0C5C-ONC125838C.0050BE06-C125838C.0051A286@domino.offis.uni-oldenburg.de>
Message-ID: <9da22622-3d56-d8d1-131f-5b287a67ed1d@gmail.com>


I think this is caused by insufficient permissions on "C:/Programme" 
junction, and the behavior of normalizePath is as documented. I can get 
the same error with "C:/Documents and Settings", which is on my machine 
a junction into "C:/Users". The path cannot be normalized using 
normalizePath(), because my user account does not have read (listing) 
permissions for the junction "C:/Documents and Settings". This is 
documented in ?normalizePath as one of the reasons for it to signal an 
error (and, on Windows, read permissions for a directory are needed for 
conversion to long path names). Normalization works fine for both 
junctions and symbolic links with sufficient permissions (note that on 
Windows, as documented, links are not resolved; on Unix/POSIX they are, 
by realpath).

Best,
Tomas

On 1/24/19 3:51 PM, David Korfkamp wrote:
> Hello,
>
> I discovered a bug or undocumented behavior in normalizePath
>
> steps to reproduce:
>
> execute normalizePath on a folder link on windows. When you are on a
> non-english windows box, you likely have links in place for windows'
> default folders, e.g. "C:\Programme" linking to "C:\Program Files" on
> german windows boxes.
>
> Thus executing 'normalizePath("C:/Programme/R")' results in an "
> path[1]="C:/Programme/R": Access is denied" error while
> 'normalizePath("C:/Program Files/R")' yields the expected result. Just
> executing executing 'normalizePath("C:/Programme")' however also yields
> the expected result,
>
> Cheers
> David
>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



	[[alternative HTML version deleted]]



[Rd] Bug or undocumented behavior in normalizePath() with file system links on windows
Tomas Kalibera