On Fri, Jul 16, 2004 at 02:45:27PM -0300, Horacio de Oro wrote:
: I was trying File.mkdirs() on Tomcat 5.0.25 on Debian Woody, and I can : say File.mkdirs() don't work if Tomcat is started with jsvc.
Step 1: perms issue?
I'm sure it isn't a permissions problem... All the users have write access to "/tmp"... That's because I choose /tmp. And everytime I made the tests, I checked that no /tmp/test directory exist.
And I start tomcat with the SAME user, whenever using "startup.sh" or "jsvc".
: String fileName = "/tmp/test/" +
: System.currentTimeMillis() +
: "/test/afile.txt";
:
Step 2: I don't recall, offhand, whether mkdir() will create a full path of directories, filling in nonexistent ones as you go.
From http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#mkdirs()
(...)
Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories.
(...)
What about
fileName = "/tmp/test/"
?
Tomcat started with jsvc:
fileName = "/tmp/test/something" => DOESN'T WORKS fileName = "/tmp/onedir" => THIS WORKS!!!
So, the problem is: Tomcat started with jsvc on Debian Woody: - File.mkdirs() WORKS if it should make ONE directory. - File.mkdirs() DOESN'T WORKS if it should make MORE THAN ONE directory.
Thanks for your response!
Horacio
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
