It's 2016 and software ***STILL*** has problems with spaces in paths!



  • Just installed the newest version of Android Studio. And... well...

    0_1458938619345_Przechwytywanie.PNG

    Every new technology I learn manages to piss me off sooner than the last...


  • area_can

    It actually is insane that we still have to deal with this nonsense in this day and age. We should take these people and make them use an OS that doesn't let you open files with arbitrary letters in their names.



  • @bb36e said:

    We should take these people and make them use an OS that doesn't let you open files with arbitrary letters in their names.

    No, they'd enjoy it too much.


  • :belt_onion:

    It doesn't have a problem with spaces, you just have to write them as %20.

    </sarcasm>



  • @JBert said:

    It doesn't have a problem with spaces, you just have to write them as %20.

    And what happens if you use a path containing a literal '%20'? It sounds suspiciously broken to me...


  • Winner of the 2016 Presidential Election

    @Nocha if it's accepting URL encoding, a literal %20 would be %2520



  • @Arantor said:

    @Nocha if it's accepting URL encoding, a literal %20 would be %2520

    Then as hesitant as I am to channel my inner blakeyrat, if that is the case it is a broken piece of shit. You have an entry box intended to contain a path. You don't have multiple paths going in there. You don't have any arguments going in. Just a path. You should be assuming that the entire contents of the box including spaces is the path. Why would you even assume spaces are not part of the path?

    facepalm


  • Winner of the 2016 Presidential Election

    @Nocha if it's accepting URL encoding and it isn't a web site, WTF IS IT ACCEPTING URL ENCODING?!?!



  • @Arantor file://


  • Winner of the 2016 Presidential Election

    @Buddy so why is something that isn't a web application, handling local files as if it is a web application?


  • sockdevs

    @Arantor Because it can load stuff from the web too?


  • Winner of the 2016 Presidential Election

    @RaceProUK :wtf:

    I'm going to go all blakeyrat here because y'all being fucking retarded.

    1. The screenshot is a dialogue to create a new project in a shitty IDE.

    2. Said screenshot clearly indicates a path is required for where the project is going to be stored.

    3. Said path needs to be a fucking path so other tools can read and write to it.

    4. Writing to a web URL makes no sense in this context.

    5. Accepting something as if it were a URL (i.e. URL encoding) also makes no sense.

    6. Unless it's a tool never designed to be used as a desktop-esque environment and is bastardised into being one.


  • sockdevs

    @Arantor Sorry for not being familiar with every single software package ever made


  • Winner of the 2016 Presidential Election

    @RaceProUK how about reading the OP?




  • sockdevs

    @Arantor Because it's not at all possible to create projects in GitHub repos using addresses like https://github.com/NodeBB/NodeBB.git


  • Winner of the 2016 Presidential Election

    @RaceProUK again, look at the screenshot. Does any of that strike you as "supports a web destination"?

    The ... button suggests not. The fact it is going to be managing a project to be passed to other tools, in this case "the NDK tools" is a pretty good bet you want it local.

    So again, why is something that is clearly intended for local use soliciting information in a format that is completely alien? It's shitty software, simples.


  • sockdevs

    @Arantor No, I get it: the Web doesn't exist, and nor does GitHub



  • @Arantor oh, you're talking aboutthe software in the op specifically? I thought you meant the general case. The softwarein the op isn't acceptingurls, it's manually detecting spaces in file system paths entered, and disallowing them, based on the high likelihood that otherprograms or plugins relied on by the ndk will fail to handle them correctly.



  • I did something special C# the other day because I forgot Server.MapPath and it broke with spaces.

    Most languages have libs for dealing with paths properly. The problem is that most of the docs don't have just a meta post that tells you how you should use them. Some guys post from years ago is still the best examples of how to use them properly.



  • @Buddy said:

    based on the high likelihood that otherprograms or plugins relied on by the ndk will fail to handle them

    Alternative suggestion: Don't rely on such crappy tools? Or process your user input to allow you to pass it through? Surely somebody at some point has come up with a method of escaping special characters in some way? I thought this was a pretty solved problem, and people should be getting it right!



  • Maybe one day someone will invent quotation marks and command line tools will be able to accept file names with spaces in them.



  • a sane file system shouldn't accept anything that isn't [a-z0-9]* for any name.



  • @Nocha processbuilder has been in java since 1.5, and takes the executable name followed by arguments as an array of strings. The trouble is they haven't marked System.exec derpecated, so there'sa bunch of halfass code still stringifying shit and munging it throughbash. Since its halfass to begin with, of course they're not gonna check that their code handlesspaces properly, and their response to your complaint's gonna be “don't use spaces then”. But it's not necessarily Android Studio, or IntelliJ that they depend on, that are the halfasses here. More likely to be halfass code in the plugins to their ide that'sbeen causing grief, in my experience.


    Filed under its 2016 why can't textboxes handle spaces inserted by autocorrect correctly?!



  • @fbmac said:

    a sane file system shouldn't accept anything that isn't [a-z0-9]* for any name.

    A sane file system should not use displayable names at all to identify files.



  • @Gąska said:

    not use displayable names at all

    Yeah, it's 2016, they should all use emoji

    :tropical_drink:



  • @loopback0 please read my posts in full. I might have fucked up grammar, but it's still unambiguous on what I meant, so it doesn't make my point any less valid.


  • Impossible Mission Players - A

    @Gąska said:

    A sane file system should not use displayable names at all to identify files.

    Agreed! Should totally use \\?\HD0P1\{129v9a-31mkaov-4oi244}:0 to reference a file!



  • @Gąska said:

    please read my posts in full

    I did - I wasn't being serious



  • @Tsaukpaetra Note that I said identify. As opposed to present to user. If file location and file name were totally separate, all issues with paths would go away.


  • :belt_onion:

    @Buddy said:

    derpecated

    I see what you did there.



  • @Gąska now we can mention @lb_ and @kt_ but how the fuck will someone mention you? we don't have this funny character in our keyboards


  • sockdevs

    @fbmac By installing some software that allows them to type ą via a simple macro?



  • @Gąska And it's open source software, what a shocker.



  • @Gąska said:

    A sane file system should not use displayable names at all to identify files.

    Amen to that.

    The name/path to a file is just meta-data. It's not the file, it's meta-data describing the file. No different than the preview icon on a jpeg.



  • @blakeyrat other than visual studio, I haven't seem a decent ide since delphi was still a thing

    Google has all the resources and incentives any closed source shop can have to enhance it

    can't see why being opensource could contribute to it

    of course, I now you're trolling anyway



  • @RaceProUK said:

    @fbmac By installing some software that allows them to type ą via a simple macro?

    I'm on mobile most of the time, or I would just copy and paste if needed.


  • sockdevs

    @fbmac A number of mobile keyboards will show accented letters if you tap-and-hold the letter you want to type with an accent; I know the WinPhone standard one does, and I'm pretty sure it's the same story for the default Android and iOS keyboards too



  • it's not that off topic, both filenames and usernames here should use only common boring characters.



  • @RaceProUK not that accent on gaska doesn't show for me



  • @RaceProUK said:

    @fbmac By installing some software that allows them to type ą via a simple macro?

    KDE!


  • :belt_onion:

    What if the path needs to be passed to a CLI and escaping spaces is a hassle? Good. Just fucking stop using spaces in the path, was that hard? Perhaps not more than escaping spaces.

    :tropical_drink:


  • Impossible Mission Players - A

    @Gąska There we go. Yeah, he's become an unmentionable unless he's posted recently, or you have the right keyboard.
    Not sure if that's a bad thing...



  • The problem is command-line tools and command options. If all commands were Java classes or were parameterized like SQL, so the command didn't have to learn its input by parsing, then there wouldn't be a need to do BS like this in Linux (escaping):

    sometool /home/me/My\ Broken\ Path/file
    

    Or Windows (quoting):

    sometool "c:\Users\Me\My Broken Path\file"
    

    Or (a'la @Gąska , which is basically parameterization):

    sometool {cc9ea878-9070-4a94-9bf4-69673f4540e1}
    

    ...any of which makes building and debugging command scripts a nightmare.

    So long as command line parsing exists, there is always going to be some kind of headache with names-containing-some-characters being misunderstood, with the easiest solution being to tell the user not to use said characters.


  • sockdevs

    @CoyneTheDup said:

    with the easiest solution being to tell the user not to use said characters.

    easiest? maybe. correct? abso-fucking-lutely not~!



  • @dse said:

    Just fucking stop using spaces in the path, was that hard? Perhaps not more than escaping spaces.

    And what if you happen to work at a place where your username has a space in it and you need to store things in your home directory for backup policy raisons? Fuck you, no android studio for you?



  • @Nocha said:

    And what if you happen to work at a place where your username has a space

    :facepalm: What nincompoop made that policy?

    To clarify, who thought it was a good idea to publish all the user names in the company directory?


  • sockdevs

    @CoyneTheDup said:

    quoting

    Is the solution to the problem



  • @CoyneTheDup said:

    So long as command line parsing exists, there is always going to be some kind of headache with names-containing-some-characters being misunderstood, with the easiest solution being to tell the user not to use said characters.

    BUT HE'S INSTALLING AN IDE. He is not, as far as any rational person anywhere in the universe would assume, doing any "command line parsing".



  • @CoyneTheDup said:

    What nincompoop made that policy?

    People's names have spaces in them. Why not their usernames?

    There's nothing wrong with that policy. The thing that's wrong is shitlords like you defending broken software. You are the reason this industry sucks. Raise your standards and stop wallowing in shit.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.