Actions
Bug #13008
closedFile::basename fails if extension contains a colon
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-cygwin]
Description
File.basename('a/b/c.d:12')
returns
c.d
but should return
c.d:12
Updated by jeremyevans0 (Jeremy Evans) over 7 years ago
I don't think this is a bug. :
is the file stream separator in NTFS (https://blogs.technet.microsoft.com/askcore/2013/03/24/alternate-data-streams-in-ntfs/). On *nix systems, you do get c.d:12
.
Updated by nobu (Nobuyoshi Nakada) over 7 years ago
I did think so, but on recent cygwin, touch c.d:12
makes a file "c.d\u{F03A}12".
Seems :
is mapped to that Private Use Area character.
I'm not sure if we should support it now.
Updated by nobu (Nobuyoshi Nakada) over 7 years ago
- Status changed from Open to Closed
Applied in changeset r57009.
file.c: cygwin behavior
- file.c: recent cygwin hides NTFS specific features.
[ruby-core:78497] [Bug #13008]
Actions
Like0
Like0Like0Like0