Results 1 to 4 of 4

Thread: Sencha cmd is mixing slashes and backslashes on Windows

  1. #1
    Sencha User Misiu's Avatar
    Join Date
    Jun 2012
    Location
    Poland
    Posts
    260

    Default Sencha cmd is mixing slashes and backslashes on Windows

    I'm using Sencha Cmd v5.1.0.13 on Windows 8.1 and I noticed that Cmd is mixing shalshes and backslashes:


    On windows backslash is used as directory separator, so it should be used in output and in config, for example in app.json. Right now I have this inside app.json:
    PHP Code:
    "output":{"base":"E:\\Dashboard\\Front/build/testing/Dashboard" 

  2. #2
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default

    In general you are correct about \'s vs /'s in paths. As it turns out, the Windows API does accept /'s as path separators. See http://msdn.microsoft.com/en-us/libr...85).aspx#paths for this:

    Note File I/O functions in the Windows API convert "/" to "\" as part of converting the name to an NT-style name, except when using the "\\?\" prefix as detailed in the following sections.
    When combining paths Cmd always uses '/' separator since that works on Windows, Mac and Linux.

    For config files, you have to decide if those files will be shared with other team members that might be on other platforms. If not, then using "\" is fine. But Cmd will generally attempt to normalize all paths to "/" separators and store cross-platform paths.

    While it is a bit odd to see in logs and such, it should work just fine.

    Thanks for the feedback and hope this helps!
    Don Griffin

    "Use the source, Luke!"

  3. #3
    Sencha User Misiu's Avatar
    Join Date
    Jun 2012
    Location
    Poland
    Posts
    260

    Default

    Don, You're right, everything works fine.
    But as You wrote it looks bit odd to see backslashes and slashes in same line.
    In java it is possible to get directory separator, so maybe on windows backslash should be used and on unix slash.
    This isn't really a bug, but maybe simple fix proposition

  4. #4
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default

    It would be simple in some cases in Java but in Ant it is a lot less clean to use an expansion vs "/" ... so we made the call to not muck up the Ant code with that concern. Glad to hear it isn't breaking anything though
    Don Griffin

    "Use the source, Luke!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •