Modify

Opened 6 years ago

Closed 6 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 Changed 6 years ago by mLipok

it change from:

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

to:

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

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

  • Resolution set to No Bug
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.