Opened 12 years ago
Closed 12 years ago
#2787 closed Bug (No Bug)
_PathSplit - remove space from parameter $sDir
| Reported by: | mLipok | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | Standard UDFs | |
| Version: | 3.3.13.0 | Severity: | None |
| Keywords: | Cc: |
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 by , 12 years ago
comment:2 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
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 by , 12 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |

it change from:
to: