This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Filesystem Filename touch fail [ was: PLEASE TEST YOUR FS ]

On 4/7/2010 4:07 PM, Charles Wilson wrote:
MVFS (ClearCase dynamic view) seems to work fine with both "foo." and "
foo "
Thats because it's a virtual file system. IBM can say whatever it wants defines a filename.

> One is a simple shared NTFS drive, I think (volinfo-1.txt). The other is
> a weird distributed filesystem of some kind (volinfo-2.txt).

Both are NTFS unless one is not.

$ touch foo.
touch: cannot touch `foo.': No such file or directory

$ touch " foo "
touch: cannot touch ` foo ': No such file or directory

Both of those are invalid under NTFS FS specifications:
"Filenames may contain any character other than NULL (0x0000) but may not contain a space (ASCII 0x20, ' ') or period ('.')"

Windows in kernel-space defines this restriction (as defined by Wikipedia):
Microsoft Windows: Windows kernel forbids the use of characters in range 1-31 (i.e., 0x01-0x1F) and characters " * : < > ? \ / |. Although NTFS allows each path component (directory or filename) to be 255 characters long and paths up to about 32767 characters long, the Windows kernel only supports paths up to 259 characters long if no UNC is used for addressing. Additionally, Windows forbids the use of the MS-DOS device names AUX, CLOCK$, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, CON, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, NUL and PRN, as well as these names with any extension (for example, AUX.txt), except when using Long UNC paths (ex. \\.\C:\nul.txt or \\?\D:\aux\con). (In fact, CLOCK$ may be used if an extension is provided.) These restrictions only apply to Windows - Linux, for example, allows use of " * : < > ? \ / | even in NTFS.


Since 'touch foo.' would result in doing an fileopen("foo.") this would be considered "bad" by Windows AND Linux ( I mounted an NTFS Partition and tried 'touch foo.' and was denied it)


Morgan Gangwere

>> Why?
> Because it breaks the logical flow of conversation, plus makes messages unreadable.
>>> Top-Posting is evil.

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]