[#68845] [Ruby trunk - Feature #11056] [PATCH] lib/net/*: use io/wait methods instead of IO.select — normalperson@...
Issue #11056 has been updated by Eric Wong.
3 messages
2015/04/11
[#68945] [Ruby trunk - Feature #11083] [Open] Gemify net-telnet — shibata.hiroshi@...
Issue #11083 has been reported by Hiroshi SHIBATA.
4 messages
2015/04/21
[#68951] Re: [Ruby trunk - Feature #11083] [Open] Gemify net-telnet
— Eric Wong <normalperson@...>
2015/04/21
shibata.hiroshi@gmail.com wrote:
[#69012] [Ruby trunk - Feature #11105] [Open] ES6-like hash literals — shugo@...
Issue #11105 has been reported by Shugo Maeda.
5 messages
2015/04/29
[ruby-core:68870] [Ruby trunk - Bug #10865] FileUtils.mv doesn't rename windows directories across volumes/partitions.
From:
usa@...
Date:
2015-04-13 08:10:34 UTC
List:
ruby-core #68870
Issue #10865 has been updated by Usaku NAKAMURA.
Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE
ruby_2_1 r50290 merged revision(s) 49634,49658,49663.
----------------------------------------
Bug #10865: FileUtils.mv doesn't rename windows directories across volumes/partitions.
https://bugs.ruby-lang.org/issues/10865#change-52136
* Author: Kartik Cating-Subramanian
* Status: Closed
* Priority: Normal
* Assignee: Usaku NAKAMURA
* ruby -v: ruby 2.1.5p273 (2014-11-13 revision 48405) [x64-mingw32]
* Backport: 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE
----------------------------------------
C:\> irb
DL is deprecated, please use Fiddle
irb(main):001:0> require 'FileUtils'
=> true
irb(main):002:0> FileUtils.mkdir("foo")
=> ["foo"]
irb(main):003:0> FileUtils.mv("foo", "bar")
=> 0
irb(main):004:0> FileUtils.mkdir("foo")
=> ["foo"]
irb(main):005:0> FileUtils.mv("foo", "F:\\foo")
Errno::EACCES: Permission denied @ sys_fail2 - (foo, F:\foo)
from C:/tools/ruby215/lib/ruby/2.1.0/FileUtils.rb:525:in `rename'
from C:/tools/ruby215/lib/ruby/2.1.0/FileUtils.rb:525:in `block in mv'
from C:/tools/ruby215/lib/ruby/2.1.0/FileUtils.rb:1579:in `block in fu_each_src_dest'
from C:/tools/ruby215/lib/ruby/2.1.0/FileUtils.rb:1595:in `fu_each_src_dest0'
from C:/tools/ruby215/lib/ruby/2.1.0/FileUtils.rb:1577:in `fu_each_src_dest'
from C:/tools/ruby215/lib/ruby/2.1.0/FileUtils.rb:514:in `mv'
from (irb):5
from C:/tools/ruby215/bin/irb:11:in `<main>'
irb(main):006:0>
I've narrowed this down to wrename in win32.c
https://github.com/ruby/ruby/blob/fa13cb050db8091658007df77f8247ae02442e51/win32/win32.c#L4728
It uses MoveFileExW with MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365240%28v=vs.85%29.aspx says:
""When moving a directory, the destination must be on the same drive.""
and also:
""MOVEFILE_REPLACE_EXISTING
1 (0x1)
If a file named lpNewFileName exists, the function replaces its contents with the contents of the lpExistingFileName file, provided that security requirements regarding access control lists (ACLs) are met. For more information, see the Remarks section of this topic.
This value cannot be used if lpNewFileName or lpExistingFileName names a directory.""
FileUtils seems to have some code built around handling this but it only handles EXDEV, not EACCES. Could you check to see if you are moving a file before passing in MOVEFILE_* so that the FileUtil code can continue to work?
Related: https://bugs.ruby-lang.org/issues/8109
--
https://bugs.ruby-lang.org/