Bug: Filenames containing / character don't synchonrize

Discuss new features and functions
Posts: 2
Joined: 1 Dec 2019

ThumbOne

Not a biggie, but a bug nonetheless. Probably only apparent on Linux systems (where I saw it) because ext4 basically allows almost nay character in filenames and is far more liberal than NTFS.

Nonetheless it's a bug, and while I don't try to have files with weird characters in them, I had one for some reason with '/' in its name. That's going to break other things on a Linux box too probably, but interestingly I didn't find anything it broke. Renaming it was trivial for example.

I suspect that all it needs is in the Linux build that there's a call to a "filename escaper" that is probably in standard libraries and prefixes all special chars in a filename with a backslash perhaps. Have to admit I'm not a pro in that, but I'd be looking to fix it in my code if this bug hit me, only because it's a little sloppy, if alas a lo ROI bug fix (almost zero net user impact - as in the number of times anyone on earth ever sees this could be countable on the fingers of one had after a decade if not even less frequently, and there is non-zero, if small, effort in researching how to properly escape filenames to avoid it). I'd be justifying it out of skill acquisition myself.
User avatar
Site Admin
Posts: 7048
Joined: 9 Dec 2007

Zenju

I'm not able to reproduce any errors with files named "\". What kind of error are you seeing?
Posts: 2
Joined: 1 Dec 2019

ThumbOne

"/" not "\".

But I tried to recreate it and failed. So did some reading and: https://stackoverflow.com/questions/9847288/is-it-possible-to-use-in-a-filename

So I tried "\" and voila an example:
Cannot write file "test\file.txt".

Error Code 22: Invalid argument [open]
So looks like I misread it and it was "\", not "/" silly me. Still, you guessed it was "\" rightly and I do get an error.