Hacker News new | ask | show | jobs
by ndsipa_pomu 1126 days ago
That's all well and good until you come across a filename with a linefeed in it - null termination is where it's at!

(I can't actually recall encountering a filename that includes a linefeed)

1 comments

I've got several empty files on my desktop (on Windows) serving as sticky notes of some sort, and they have line breaks in their names, obviously.
I didn't even know that Windows supported that, but I try to keep away from it as much as possible. Makes for an interesting test of scripts, I suppose. Sometimes, I script BASH to cope with any any filenames, but it depends on the usage as a lot of the time you can guarantee that files will be at least semi-sensible.