Project

General

Profile

Backport #4327

File.rename bug in windows

Added by guai (guai guai) over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
[ruby-core:34881]

Description

=begin
file with weird name does not want to be renamed

ruby -e's, d = "C:/amp/test/functional_tests/testrepo/.hg/store/_s_t_y_l_e.txt.i20110127-712-1si7vtj-..i", "C:/amp/test/functional_tests/testrepo/.hg/store/data/_s_t_y_l_e.txt.i"; p File.exist?(s); p File.rename(s,d)'
true
-e:1:in rename': No such file or directory - (C:/amp/test/functional_tests/testrepo/.hg/store/_s_t_y_l_e.txt.i20110127-712-1si7vtj-..i, C:/amp/test/functional_tests/testrepo/.hg/store/data/_s_t_y_l_e.txt.i) (Errno::ENOENT)
from -e:1:in
'

ruby -v
ruby 1.9.2p136 (2010-12-25) [i386-mingw32]
=end

History

#1

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

=begin
Hi,

At Thu, 27 Jan 2011 10:01:33 +0900,
Alexey Gunchin wrote in [ruby-core:34881]:

file with weird name does not want to be renamed

ruby -e's, d = "C:/amp/test/functional_tests/testrepo/.hg/store/_s_t_y_l_e.txt.i20110127-712-1si7vtj-..i", "C:/amp/test/functional_tests/testrepo/.hg/store/data/_s_t_y_l_e.txt.i"; p File.exist?(s); p File.rename(s,d)'
true
-e:1:in rename': No such file or directory - (C:/amp/test/functional_tests/testrepo/.hg/store/_s_t_y_l_e.txt.i20110127-712-1si7vtj-..i, C:/amp/test/functional_tests/testrepo/.hg/store/data/_s_t_y_l_e.txt.i) (Errno::ENOENT)
from -e:1:in
'

Does the destination directory exist?

--
Nobu Nakada

=end

#2

Updated by guai (guai guai) over 8 years ago

=begin
Nobu, you are right. It does not. My bad.
=end

#3

Updated by usa (Usaku NAKAMURA) over 8 years ago

  • Status changed from Open to Rejected

=begin

=end

Also available in: Atom PDF