[Rd] dir.create bug (PR#6892)
jkbreaux at san.rr.com
jkbreaux at san.rr.com
Tue May 18 04:08:37 CEST 2004
Full_Name: Jim Breaux
Version: 1.9.0
OS: WinXP
Submission from: (NULL) (209.78.110.135)
dir.create() is reporting a warning that a directory already exists when in fact
the directory does NOT already exist. However, the erroneous behavior does not
manifest itself until dir.create() has been called at least once to create a
directory that DOES already exist. For example:
# Create a directory that does NOT exist:
> result <- dir.create("C:\\TEMP")
> result
[1] TRUE
# Create another directory that does NOT exist:
> result <- dir.create("C:\\TEMP2")
> result
[1] TRUE
# Now try to create a directory that DOES already exist:
> result <- dir.create("C:\\TEMP")
Warning message:
'C:\TEMP' already exists
> result
[1] FALSE
# Finally, try to create a directory that does NOT exist:
> result <- dir.create("C:\\TEMP3")
Warning message:
'C:\TEMP3' already exists
> result
[1] TRUE
Notice that in the last case, result == TRUE as expected; however, the warning
message should not be reported.
More information about the R-devel
mailing list