Bill Deegan
2008-11-10 23:57:09 UTC
Greetings,
For various reasons I need to create a series of empty directories.
I'm using;
Execute(Mkdir('d:/my/path'))
When that path already exists I get the following messaging from scons:
===========start of example message================
Mkdir("d:\my\path")
scons: *** d:\my\path: Cannot create a file when that file already exists
==========================================
To avoid getting these messages I need to use: os.path.isdir('d:\my\path')
I would expect that Mkdir(anypath) wouldn't issue a such a message unless
the file system object was a file and not an existing directory.
Is this a bug?
I searched the source and it looks like the message must be propagating from
the OS, since I couldn't find the message string.
Thanks,
Bill
For various reasons I need to create a series of empty directories.
I'm using;
Execute(Mkdir('d:/my/path'))
When that path already exists I get the following messaging from scons:
===========start of example message================
Mkdir("d:\my\path")
scons: *** d:\my\path: Cannot create a file when that file already exists
==========================================
To avoid getting these messages I need to use: os.path.isdir('d:\my\path')
I would expect that Mkdir(anypath) wouldn't issue a such a message unless
the file system object was a file and not an existing directory.
Is this a bug?
I searched the source and it looks like the message must be propagating from
the OS, since I couldn't find the message string.
Thanks,
Bill