text: Opened 6 years ago
  Closed 6 years ago
  #2787 closed Bug (No Bug)
  _PathSplit - remove space from parameter $sDir
  Description
  REPRO:
  #include <Array.au3> #include <File.au3> Local $sDrive = "", $sDir = "", $sFilename = "", $sExtension = "" Local $aPathSplit = _PathSplit("z:\TOOLs\Macro\ FORUM\ FORUM -- z forum\FunctionNameLister\_PathSplit.au3", $sDrive, $sDir, $sFilename, $sExtension) _ArrayDisplay($aPathSplit, "_PathSplit of " & @ScriptFullPath) MsgBox(0, '02', $sDrive & @CRLF & $sDir & @CRLF & $sFilename & @CRLF & $sExtension)
  there is a problem in _PathSplit exactly here:
  $sDir = StringRegExpReplace($aArray[2], "\h*[\/\\]+\h*", "\\")
  Attachments (0)
  Change History (6)
  comment:1 Changed 6 years ago by mLipok
  comment:2 Changed 6 years ago by anonymous
  That path name is invalid in Windows, trying to create a path with spaces before the name causes Windows to strip the spaces. It may be a valid path in another OS, but Windows won't allow you to create one.
  comment:3 Changed 6 years ago by mLipok
  I did the tests.
  Windows automatically removes the first spaces, when trying to create.
  I create this folders in Total Commander.
  When you create a Windows allows normally open and save in these folders.
  comment:4 Changed 6 years ago by BrewManNH
  I ran the test script, and noticed that the array holds the correct information. So, you could just use the array instead of the common variables. That would satisfy both the Windows standard naming process, and the pathnames you're using.
  comment:5 Changed 6 years ago by mLipok
  I myself have advised this problem by removing such names from my systems.
  Alternatively, could add (to HelpFile) relevant information as to how this works or about directory naming standards.
  comment:6 Changed 6 years ago by guinness
  -.
  it change from:
  to: