Java File.setWritable() and stopped working correctly after JDK 6u18

后端 未结 1 431

We have a Java application with a particular module that checks if a temporary directory is \'writable\' before executing its function. To test this, we have a JUnit test th

相关标签:
1条回答
  • 2021-01-03 05:03

    If you're on Windows, it's probably related to this bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6728842

    Apparently setWritable(false) never really worked for directories on Windows, because the readonly flag doesn't actually make a directory readonly.

    0 讨论(0)
提交回复
热议问题