Message-ID: <20040518020837.88FB71068C@slim.kubism.ku.dk>
Date: 2004-05-18T04:08:40Z
From: jkbreaux@san.rr.com
Subject: dir.create bug (PR#6892)
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.