Modify

#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 mLipok, on Jul 9, 2014 at 12:00:30 PM

it change from:

\TOOLs\Macro\    FORUM\    FORUM -- z forum\FunctionNameLister\

to:

\TOOLs\Macro\FORUM\FORUM -- z forum\FunctionNameLister\

comment:2 by anonymous, on Jul 9, 2014 at 3:53:22 PM

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 mLipok, on Jul 9, 2014 at 4:13:51 PM

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 BrewManNH, on Jul 10, 2014 at 6:49:13 PM

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 mLipok, on Jul 10, 2014 at 7:42:49 PM

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 guinness, on Jul 15, 2014 at 4:09:55 PM

Resolution: No Bug
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.