Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
FULL PRODUCT VERSION : java version "1.7.0-ea" Java(TM) SE Runtime Environment (build 1.7.0-ea-b99) Java HotSpot(TM) 64-Bit Server VM (build 19.0-b03, mixed mode) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows [Version 6.0.6001] A DESCRIPTION OF THE PROBLEM : Directories are locked for "Rename" and "Move" operations by the watcher service. If a directory is being watched, parent directories cannot be renamed. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Register a directory to be watched, for example : "D:/temp/a/b/c" Then try to rename "D:/temp/a/" to "D:/temp/a123/" EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - "D:/temp/a/" is renamed to "D:/temp/a123/" ACTUAL - Operation Fails. windows reports :Insufficient Permisions for operation. ERROR MESSAGES/STACK TRACES THAT OCCUR : windows reports :Insufficient Permisions for operation. REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- public static void main(String[] args) throws IOException { Path dir = Paths.get("D:/temp/a/b/c"); WatchService w =FileSystems.getDefault().newWatchService(); dir.register(w, ENTRY_CREATE,ENTRY_DELETE, ENTRY_MODIFY); for(;;){} } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : None...
|