Menu

Can not delete message

Help
songzi
2004-11-30
2013-05-01
  • songzi

    songzi - 2004-11-30

    When I delete messages in a folder. it doesn't work. I debug the source code. in Folder#expunge() getDeletedMessageCount() always return 0. and in MboxFile#purge(int[] msgnums)  file.renameTo(tempFile) return false that be proved the opeation fail. Can you tell me how to fix this problem.

     
    • Ben Fortuna

      Ben Fortuna - 2004-11-30

      I had a quick look and you are right - the rename of the original file to the temp file is not working. It seems that something is still locking the file even after closing the channel (I tried with another sample file and it worked ok).

      There seems to be a lot of bugs regarding File.renameTo() on Sun's bug-tracker, so this could be a bug in the JDK. I'll keep investigating why the file lock is not being released, but as a last resort I may have to find an alternative to File.renameTo().

      I'll keep you posted on how its going.

      regards,
      ben

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.