Announcement

Collapse
No announcement yet.

Trim Output Folder Spaces

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trim Output Folder Spaces

    Hello,

    Minor item. I accidentally added a space to the end of my output folder in the Build settings. This created a destination folder with an imbedded space which is impossible to remove except through the command prompt. Spaces should be trimmed from the result.

  • #2
    I don't see that as a bug at all -- you told it to create it; it did.
    as for "impossible to remove except thru the command line" -- what os are you using? I tried removing it thru suf's lua; explorer and another program; and all were able to remove it w/o problem on
    win2000
    winxp
    win2003

    Comment


    • #3
      Ok, technically it's not a bug, but would anyone EVER want to create a folder like that? It should be trimmed. Windows explorer would not let me delete it in Vista anyway... It acted like it removed it, but then it still showed up.

      Comment


      • #4
        Originally posted by wunder View Post
        Ok, technically it's not a bug, but would anyone EVER want to create a folder like that? It should be trimmed. Windows explorer would not let me delete it in Vista anyway... It acted like it removed it, but then it still showed up.
        Becuase, perhaps, I WANT to create it.. for whatever reason... I'm creating a directory based on some flags; and one of those flags happens to be a blank/space.

        Secondly; your problem is more likely an issue with UAC than with explorer -- it's not a bug -- I just tested it in vista; no problem with the proper rights....

        Comment


        • #5
          I guess we'll have to agree to disagree.

          Comment


          • #6
            Originally posted by wunder View Post
            I guess we'll have to agree to disagree.

            Don't know what we disagree on.. I tested it with vista 32bit and vista 64bit iwth all current patches.

            with an suf7 setup -- I created several folders
            "c:\program files\myprog\fish "
            "c:\users\josh\cat "

            I was able to delete (thru explorer) the "cat " directory w/o a problem.
            I wasn't able to delete the "fish " folder due to UAC; disable uac, and folder was removed w/o problems.

            Since you're not giving specifics on how your getting your issue; then yes; we disagree -- if you say create "folder " and it does create it; that's not a bug -- if you say create "Folder " and it creates something else; that would be a bug.

            Imagine that if you told, in your code, that the program should display a font in blue with blue background; but SUF decides "blue wont' show; I will display green instead" -- would that be a bug? I sure would consider it one. The program should do what I tell it to do; not what it thinks it should do.
            That's just my HO -- I hope IR doesn't change this.

            You could do something like this; and just get in the habbit of using it instead:

            Code:
            function Folder.mkdir( cPath )
              cPath = String.TrimRight( cPath );
              Folder.Create( cPath );
            end
            now when you do
            Folder.mkdir( "My folder ");
            you will get "My folder"

            -josh
            btw: Explorer / windows seems to not display the space -- I found it interesting that with the space, I could still do:
            cd "cat " (a few dozen spaces, the forum software trims the display a bit; but you probably wouldn't consider that a bug either.... ;-) )
            and it would go to that directory.... as would
            cd "cat" (no spaces)
            Last edited by jassing; 03-20-2008, 10:31 AM.

            Comment


            • #7
              I meant we disagree that spaces after a folder name should be trimmed.

              I just tested this again on my Vista Business machine.

              1) Added a space in after output folder (in my case, ls70) in the Build Settings.

              2) Created the build.

              3) Now go into Vista's Explorer window. I see what appears to be 2 'LS70' folders. Interestingly, when I click on either of them, they both take me to the folder with the space on the end! So maybe the bug is in Vista instead of setup factory

              4) I think I may have found the difference between us now- I deleted the folder- it deleted the one with the space, and now the one without the space is showing up in my vista folder!

              Vista explorer is apparently having a problem with the space. Regardless, I stil think it should be trimmed. At the very least it would be nice if it warned the user that there is a space at the end of the folder name for the 99.9999999% of developers who don't want a space at the end of their output folder name!

              Comment


              • #8
                Originally posted by wunder View Post
                3) Now go into Vista's Explorer window. I see what appears to be 2 'LS70' folders. Interestingly, when I click on either of them, they both take me to the folder with the space on the end! So maybe the bug is in Vista instead of setup factory
                Vista does indeed do things "differently" -- Vista is now using link folders; which MS never officially supported previously.

                I noticed that while I can "make" olders, when I see them, they all have the space trimmed by the system (dos, explorer etc) -- I was missing that you had a folder of the same name already there; just w/o any spaces.

                Drop to dos and do md "test "
                the resulting dir is "test" (no space) with my quick test I did; I didn't replicate your problem (two dirs) but I suspect I need to follow your steps exactly -- which I will later.
                No matter what; the "end" that you're experiencing is an issue with Vista...

                Originally posted by wunder View Post
                4) I think I may have found the difference between us now- I deleted the folder- it deleted the one with the space, and now the one without the space is showing up in my vista folder!
                Very possible since you confirmed you had two folders. All is working; possibly tho, not as it should -- can you re-replicate the issue and see if the two (via dos) folders are actual folders or if one is a link to the other?


                Originally posted by wunder View Post
                Vista explorer is apparently having a problem with the space. Regardless, I stil think it should be trimmed. At the very least it would be nice if it warned the user that there is a space at the end of the folder name for the 99.9999999% of developers who don't want a space at the end of their output folder name!
                I'm all or a warning! (Finally! we do agree....)

                -j

                Comment

                Working...
                X
                😀
                🥰
                🤢
                😎
                😡
                👍
                👎