[#104004] [Ruby master Feature#17883] Load bundler/setup earlier to make `bundle exec ruby -r` respect Gemfile — mame@...
Issue #17883 has been reported by mame (Yusuke Endoh).
21 messages
2021/05/24
[ruby-core:103856] [Ruby master Bug#12551] Exception accessing file with long path on windows
From:
nobu@...
Date:
2021-05-15 08:18:52 UTC
List:
ruby-core #103856
Issue #12551 has been updated by nobu (Nobuyoshi Nakada).
Thank you for the input.
It seems different from this document a little:
https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later
Is it convertible?
----------------------------------------
Bug #12551: Exception accessing file with long path on windows
https://bugs.ruby-lang.org/issues/12551#change-91979
* Author: Maturin (Lars Benner)
* Status: Open
* Priority: Normal
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Accessing file with a long file name causes this exception:
C:/Projects/Head/Build/cm/testdir01/testdir02/testdir03/testdir04/testdir05/testdir06/testdir07/testdir08/testdir09/testdir10/testdir11/testdir12/testdir13/testdir14/testdir15/testdir16/testdir17/testdir18/testdir19/testdir20/testdir21/testdir22/longtestfile.name.txt
repro_lstat_exception.rb:42:in `stat': No such file or directory @ rb_file_s_stat - C:/Projects/Head/Build/cm/testdir01/testdir02/testdir03/testdir04/testdir05/testdir06/testdir07/testdir08/testdir09/testdir10/testdir11/testdir12/testdir13/testdir14/testdir15/testdir16/testdir17/testdir18/testdir19/testdir20/testdir21/testdir22/longtestfile.name.txt (Errno::ENOENT)
from repro_lstat_exception.rb:42:in `block in <main>'
from repro_lstat_exception.rb:13:in `chdir'
from repro_lstat_exception.rb:13:in `<main>'
Can be reproduced with the attach script.
I used windows 7 64 bit and an NTFS file system.
For me it looks like, it has something to do with the legacy MAX_PATH_LENGTH of 260 characters. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath for more information.
Originally I discovered the bug with JRuby (https://github.com/jruby/jruby/issues/3995).
With older Ruby version, I tried 1.8.5, it is working.
---Files--------------------------------
long_file_name_error.zip (10.7 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>