C:\ONGRTLNS.W95, OneDrive
ignorethecode.net
ignorethecode.net
I purchased a Surface 3. Later on I decided to add their warranty ("Microsoft Complete") due to concerns about heat levels on the i5 S3.
So I went to their warranty page, entered all my info, and nothing. It stopped me on the shopping cart page with the warranty in my basket, no error. Just refuses to continue.
After spinning up the developer bar and looking at the network tab I was able to discern that an error was being returned but it was just a generic internal code with no description or Google-able resources.
I talked with support, they couldn't help me, and just suggested I email a different support email address who never got back to me (even now).
After a couple of weeks I had all but given up on ordering the warranty. But after having activated Google Authenticator on my Google Account, I decided to poke around in my Microsoft Account settings to see what they offered security-wise, and noticed my "basic info" region was set to the UK (I am in the US currently), even though my billing info was set to the US...
After changing my "basic info" region the warranty site just worked correctly as you'd expect. Not that I ever would have known that had it not been for pure luck.
When I switched to Firefox, it magically worked.
For example, you can’t start files with a space, something a lot of people do to move files to the top of alphabetical lists.
Do people really do that? That would drive me bonkers. Granted, I mainly work from a CLI so I guess it may not be as annoying if you mainly use a GUI.
I don't know about people doing stuff in file systems these days like that, but it is a simple hack.
Then there was the time another package tried to write out street addresses that were something like 3E123 or maybe it was E456. Apparently the control read them as numbers in scientific format that were just way too big.
And also, I did not realize that you could create filenames that contained spaces at the front (or back) on Windows systems. In fact, I'm not sure that's ever been allowed on Windows... has it?
About 15 years ago, I had to migrate an entire Mac OS9 office group (200 systems) to Windows PC. I wrote a Python script to validate filenames and fix them in cases where they contained illegal Windows characters. We would ftp the files up to a Unix system, run the Python filename cleaning script then ftp down to the Windows PCs. It worked rather well, except for cases where the accountants named files something like this, "Summer-Report-07/15/1997.csv"
Mac OS9 file names allowed many characters that Windows did not and OSX may have inherited some or all of these things.
AFAIK, MacOS X also disallows NUL and slash, but IIRC its GUI silently switches slash (Unix path separator) with colon (which IIRC was the MacOS 9 path separator). So, if you were to migrate to OS X instead of to Windows (and if my knowledge is correct) you'd just have to replace the / with a : and the users wouldn't even notice.
Just tried it from the command line and, yes, its quite possible on Windows 8.1.
For a cloud file synchronization app, though, I'd expect Microsoft to not let these kinds of restrictions leak down to clients.
echo hi > " hello.txt"
Explorer can see this file and perform operations on it, but if you try to rename it to a name with leading or trailing spaces, they get trimmed.I have used '~' to cause files to sort at the top - this seems to be some oddity of the sorting order that Explorer uses, since ~ would sort at the end in ASCIIbetical order - but at least it's an allowed character at the beginning of a name in Explorer, unlike space.
I have no idea how this was missed in QA.
HFS+ happily stores characters in paths that NTFS does not accept such as | and $ (and, I think to this day, /. Traditional Mac OS used colons as path separators. The Mac OS X Unix layer swapped colons and slashes)
Also, NTFS and HFS+ use different Unicode normalization algorithms (IIRC, the Mac decomposes strings; that would make Mac paths longer in some cases)
If you look closely, it is a miracle that we can have interop between different file systems at all. There is a lot of ugliness here. For example, see what Microsoft says about that 255 character limit:
"The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters. This type of path is composed of components separated by backslashes, each up to the value returned in the lpMaximumComponentLength parameter of the GetVolumeInformation function (this value is commonly 255 characters*)."
So, before starting that copy, you really should query the target disk for its maximum pathname component length.
Finding hat disk in the presence of reparse points, substituted drives, etc. may be a challenge in itself.
After reading the recent "Bullshit jobs" article, I wonder how much human effort has been expended on deliberately making it harder for someone who happens to be in one country to buy from a company that happens to be in another.
http://cryptome.org/2014/11/ms-onedrive-nsa-prism.htmSo really I'd say these are limits of not knowing or bothering to use the escape hatch in Windows's support for this stuff.
A LOT of third party software would definitely be broken if they altered Windows filename restrictions. They would also have to drop support for FAT32 as you pointed out.
Right now a lot of Windows 95 software continues to run 20 years later. And in no small part because of this type of attitude and all the runtime patching Microsoft does.
Now we've got a situation where we keep crowing about how changing MAX_PATH would break compatibility. Except, of course, that we already did that by adding the stupid '\\?\' APIs (which are themselves a mess).
So now we don't actually have backward compatibility for those programs (we just make it so hard to use long paths that we virtually have backward compatibility.) And we have file paths that resemble 1995. We don't have the lowest common denominator, we just have the worst of both worlds.
I'm surprised with Metro/Modern/RT/whatever's APIs they didn't try and move forward by utilising \\?\ in Windows.Storage.*. But from what I've been able to tell they have the same limitations as other .Net or Win32 APIs.
This is a little dubious. When you load a FAT driver on a *nix system, you get the limitations of FAT. Likewise there are lots of fancy filesystem APIs in Windows that fail on a FAT volume and work on NTFS.
That said, there are a lot of quirky NTFS behaviors that are ultimately rooted in FAT. I used to get frustrated by a lot of them, then I started writing a FAT driver just for fun ... and it made sense. All the goofy things about naming start to make sense if the direntry "is your inode" and the extra space in the name is padded with spaces...
Particular hairballs to watch out for regarding the path length/filename length issue (please forgive me if I've got these slightly wrong as I'm paraphrasing roughly from memory):
• Normal MAX_PATH == 260 WCHARs (hardcoded in the Windows API), including the drive letter, colon, backslash, and the trailing NUL;
• Directory names in the normal API can't be longer than (MAX_PATH-12) WCHARs, so that they can always contain a FILENAME.EXT;
• You can use extended-length paths with a "\\?\" prefix (exactly); UNC network drive paths which you want to be extended-length should start "\\?\UNC\" (exactly), then append the server name, backslash, share name, backslash, path and file etc;
• Extended-length paths only generally work with W/Ex APIs;
• The buffer used for extended-length paths is 65536 bytes, including the trailing NUL, but that also needs to contain any expansions during processing;
• Names passed with the extended-length API do not have to be valid or normalised Unicode;
• Components (split between backslashes, i.e. filenames) of an extended-length path are in fact still limited to GetVolumeInformation/GetVolumeInformationByHandleW/etc's lpMaximumComponentLength, which is often 255 (WCHARs) but not always;
• It counts WCHARs not codepoints (look out for codepoints beyond the Basic Multilingual Plane!);
• There are no relative paths or current directories in this API, everything is absolute, so no plain filenames, and "." and ".." are actually valid names not directory references;
• Most of the Explorer shell, and all of cmd.exe (as of W8, don't know about W10) doesn't use them, and because of the above you can't use them as a cd, you can pushd them but stuff will break;
• Several APIs don't even support it;
• So you can make files and directories which a good half of Windows and related applications can't do anything with, and are very pesky to delete…
…and beyond that is where it gets really hairy. The code in this area involving devices (from "\\.\PhysicalDisk0" to good ol' "COM1") is particularly Cthulhu-esque, as is the code regarding Terminal Services and Hyper-V. (A good sweep through there looking for off-by-ones might be fruitful, as those with sharp eyes may have spotted from the above.)
I'll make allowances for needing to be incredibly careful about backwards compatibility to a really old VMS/GEMDOSish codebase, and being patch-upon-patch-upon-patch as a result. But that they had the opportunity to fix it in NT, and sadly missed it irks me: that and the locking semantics (especially regarding running executables) are probably my least favourite characteristics of Windows.
Linux, for example, is much easier about this particular kind of thing, but its flexibility does have its own problems when absolutely anything can be in a filename and people often forget that (for example, the delightful fun that can ensue when someone starts a filename with "-", say, "-rf" and someone does a "rm " which globs it first, because globbing doesn't know or care what switches are, but you* will).
I fondly remember learning the hard way to prefix my shell globs with paths, as in "rm ./*". I was root on that system, too.
They're already paying for Office 365 so SHOULD be entitled to "unlimited" OneDrive storage. It just doesn't work (either the unlimited or OneDrive in general).