1 Reply Latest reply on Aug 5, 2007 5:50 AM by Tomasz Szymanski

    Deleting files in Windows

    Tim Liu Newbie

      I've been testing the JBoss Wiki, and i just first wanted to say good job on porting the JSPWiki. I looked into doing it for a while for a project I'm working on until i found the JBoss Wiki.

      The mechanism for deleting files using the File.renameto (Found in FileAttachmentDataSource and FileMediaDataSource) in Windows has been giving me a lot of trouble. I found this bug:


      It basically says that with windows sometimes you need to do a garbage collection (System.gc()) before you can successfully rename a file.

      We will eventually be deploying on a Linux machine, but I just want to let everyone know that when testing on windows you may run into the problem and it can be fixed by using the System.gc() if the renameto fails.

      Maybe you've already addressed this problem or my machines are messed up, but i didn't see anything else on the forum. sorry if i'm just repeating someone else.