Naming Torrents - eviltoast
  • gayhitler420@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    arrow-down
    1
    ·
    1 year ago

    I’m with the person you’re replying to, what’s an example? I haven’t had a problem working with filenames with spaces in at least ten years on windows, Linux or Mac…

      • gayhitler420@lemm.ee
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        2
        ·
        1 year ago

        Escape characters and autocomplete exist.

        It’s also really good practice to account for weird characters in programs and shell scripts you write because then you don’t have injection vulnerabilities or unicode problems.

        Seriously, what’s an example of spaces in filenames causing a problem?

        • bam13302@ttrpg.network
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          1 year ago

          for f in *.txt; do cat $f; done

          Will error for example. It works fine for filenames without space, but if the filename has space in it, it will be interpreted wrong. But if your testing batch doesn’t have spaces in the filename, you won’t see the issue until it’s used on a file that does. Note ‘cat’ is a placeholder, any function/script that can be used on a file here will have the same issue.

          Something similar to that caught me last week while I was unzipping multiple mods in bulk for a game.

              • gayhitler420@lemm.ee
                link
                fedilink
                English
                arrow-up
                2
                ·
                1 year ago

                I didn’t notice that part of your post. 🙏

                The point I guess I was getting at was that even having “come up” with Slackware and a whole os that’s just 69 half baked scripts in a trenchcoat I adopted a more universal mindset and specific skill set when using scripts over ten years ago and find it hard to justify expecting sanitary inputs nowadays when it is harder and harder with Unicode and is a serious security threat to treat variables as passable strings.

                I wasn’t trying to suggest that there isn’t a way to make a space in a filename cause an error, but that I can’t think of an example where allowing a space to affect things was a good or right way to do something.

                In the specific example of the op, no spaces is a scene rule from the days of ftp and irc/usenet. The idea behind having only a subset of the ascii character set was to allow those services to work with the files and commands around them. There’s no reason to treat my own scripts and programs as if they’ll never encounter the galaxy of other characters that are flying around now and to be honest, theres no reason not to work in sane handling of non ascii characters in filenames even for code I only expect to touch scene stuff.

                It used to be an unavoidable mistake when we dug up buried utilities. Now that there’s a number to call first it’s only the fault of the knucklehead with the shovel.

                Please don’t read this as some kind of an argument. I think we basically agree and I’m not trying to get one over on you.

                • bam13302@ttrpg.network
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  edit-2
                  1 year ago

                  To be fair, I didn’t really focus on the biggest annoyance I’ve had with spaces in the file name: going between terminals and the GUI, most filenames you can copy and paste with wild abandon, but filenames with spaces always require special care, sometimes stripping the auto completed escaped space from file names from the terminal, or quoting or escaping the space when taking one from the GUI.