Description
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...
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...
Attachments
Issue Links
- duplicates
-
JDK-6968095 Copying privileges suspended on networked drive
- Closed
-
JDK-7052142 Java7 WatchService - Access Denied error trying to delete recursively watched ne
- Closed
-
JDK-7052697 WatchService on Windows keeps dir open, parent dir cannot be renamed
- Closed