News for hackers. Stuff that matters.
Re:Anything longer ago than yesterday should just say the ac... by explaininjs on Saturday October 14, 2023 @05:32PM (#37884453)
Does windows not allow spaces or something? Unix variants seem fine with it.
Re:Anything longer ago than yesterday should just say the ac... by Dalewyn on Saturday October 14, 2023 @05:55PM (#37884600)
Programmers hate dealing with whitespace in strings with a burning passion.
Re:Anything longer ago than yesterday should just say the ac... by cratermoon on Saturday October 14, 2023 @07:25PM (#37885216)
Which I've always considered a weird anachronism, because 'space' isn't represented any differently than any other character, U+0020, unless you really want to get into the variety of "whitespace" elements. Same with newlines. It's all bytes.
Re:Anything longer ago than yesterday should just say the ac... by bigDinosaur on Saturday October 14, 2023 @06:01PM (#37884659)
Best to avoid spaces in file names even if the OS allows it (hell, you can put a new line in file names in Linux and I believe Mac OS but that's a terrible idea) because many programs will exhibit major error states if they end up processing these names due to assumptions about file names.
Re:Anything longer ago than yesterday should just say the ac... by OmegaMetor on Saturday October 14, 2023 @07:00PM (#37885047)
Macos allowing leading spaces in file/folder names made for some fun shenanigans on a school laptop with not great grep usage for blocking apps.
Re:Anything longer ago than yesterday should just say the ac... by devoutsalsa on Saturday October 14, 2023 @08:35PM (#37885663)
Best to combine a carriage return and tab.

    irb> puts “2021-11-21\r\t15:10:35”
    2021-11-21
        15:10:35
Re:Anything longer ago than yesterday should just say the ac... by krater23 on Sunday October 15, 2023 @03:38AM (#37887762)
And thats the reason why we should use more spaces and other special characters in filenames at every public used places. Thats the only way this bugs of lazy and stupid software developers getting fixed finally.
Re:Anything longer ago than yesterday should just say the ac... by bigDinosaur on Sunday October 15, 2023 @06:52AM (#37888669)
The principled stance is nice (and I agree with it generally) but sometimes you just need to get work done and not have to rely on trying to get some developer to fix something. Fully agreed though that it's lazy programming if an application can't deal with spaces.
Re:Anything longer ago than yesterday should just say the ac... by layer8 on Saturday October 14, 2023 @06:40PM (#37884917)
Windows does not allow the colon (":") in filenames, so you can't use the ISO date-time format in filenames anyway.
Re:Anything longer ago than yesterday should just say the ac... by Too on Sunday October 15, 2023 @01:31AM (#37887143)
The reason for avoiding spaces in file names is because of broken bash scripts, that don’t quote their arguments. Meaning about 99 out of 100 of them.

Not that avoiding such names solves the problem, it just makes the RCE vulnerability more latent.

Re:Anything longer ago than yesterday should just say the ac... by explaininjs on Sunday October 15, 2023 @01:56AM (#37887265)
Soundly like space-filled names would be a good best practice to force you to harden your scripts.
Re:Anything longer ago than yesterday should just say the ac... by _dain_ on Sunday October 15, 2023 @05:06AM (#37888193)
Microsoft deliberately named it "C:\Program Files" for exactly this reason.
Re:Anything longer ago than yesterday should just say the ac... by bmicraft on Sunday October 15, 2023 @08:28PM (#37894677)
That makes a surprising amount of sense actually