Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.5.1
-
Fix Version/s: JRuby 1.6
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Windows
-
Number of attachments :
Description
I can't move a folder onto a UNC path. So a
mv src,dest, :verbose => true, :force => true
where dest is a windows share doesn't do anything. Mapping the share doesn't help, and mounting the share in linux doesn't do anything either. It doesn't throw any errors, but no files are moved. I can reproduce this easy enough with a gem generate_index -d <share_name> where <share_name> can be a UNC path, a mounted drive pointing to a windows share, or a linux mount point which mounts the windows share.
The RubyFile.java class does throw the "throw runtime.newErrnoEACCESError(oldNameJavaString + " or " + newNameJavaString);" exception, but FuleUtils.rb seems to ignore it.
This could be related to http://jira.codehaus.org/browse/JRUBY-2724
Issue Links
- relates to
-
JRUBY-2724
Can not create Ruby on rails application while using UNC path folder
-
-
JRUBY-5240
FileUtils methods (mkdir, mkdir_p and cp_r) are not accept windows network address: //machine_ip/shareDir
-
The issue appears to be creating the folder on a windows share. I've been doing some digging, and the RubyDir.java mkdir function does correctly throw the exception, but FileUtils.mv doesn't catch it correctly. In mv the Rename exception is caught, but in the rescue a copy then delete is tried. The copy also fails, with an exception, but since it is never caught, it fails silently. This is all the info I have on the exception part, as to why it can't create the folder, I'm still not sure, but I think it's in the getPosix().mkdir call.