From jkbreaux at san.rr.com  Tue May 18 04:08:37 2004
From: jkbreaux at san.rr.com (jkbreaux@san.rr.com)
Date: Tue May 18 04:08:40 2004
Subject: [Rd] dir.create bug (PR#6892)
Message-ID: <20040518020837.88FB71068C@slim.kubism.ku.dk>

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.


[Rd] dir.create bug (PR#6892)
jkbreaux@san.rr.com