DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=39375>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39375 ------- Additional Comments From [EMAIL PROTECTED] 2006-04-30 07:17 ------- Hi Mario, currently I'm using linux on XFS. For the code I'm giving to you, I'm currently executing it as user [kiuma], but the file I'm moving belongs to user [anotheruser]. Permissions on file as follow: -rw-r--r-- 1 anotheruser users 0 30 apr 09:06 filetomove Here it is the code: public class TestLocalFS extends LoggedTestCase { protected void setUp() throws Exception { super.setUp(); } protected void tearDown() throws Exception { super.tearDown(); } public void testLocalFileMove() throws Exception { String dir = "file:///home/kiuma/temp/"; String file1 = dir + "filetomove"; String file2 = dir + "filetomove2"; FileSystemManager fsManager = VFS.getManager(); FileObject fo2 = fsManager.resolveFile(file2 ); FileObject fo = fsManager.resolveFile(file1 ); try { if (fo.exists()) { fo.moveTo(fo2); } else { fo2.moveTo(fo); } } finally { fo.close(); fo2.close(); } } } The problem disappear if I replace: if (fo.exists()) { fo.moveTo(fo2); } else { fo2.moveTo(fo); } with---------------------------------------------------- if (fo.exists()) { fo.moveTo(fo2); } else if (fo2.exists()) { fo2.moveTo(fo); } I hope this can help you, kiuma -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]