Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: CleanPath

by Anonymous Monk
on Oct 25, 2011 at 13:39 UTC ( #933624=note: print w/replies, xml ) Need Help??


in reply to CleanPath

It appears to be common to split on ; and your program is no exception.

It doesn't appear to handle quoted path names, which are valid, both the "pa;th" and "pa th"\"of space" variety

shell commands (copy paste into cmd.exe):
md "pa;th" echo @echo how the pa;th are ya > "pa;th"\pathme.bat pathme set path="pa;th";%path% pathme md "pa;th"\"of space" echo @echo how the pa;th\of space are ya > "pa;th\of space"\pathem.ba +t pathem set path="pa;th"\"of space";%path% pathem
Output:
C:\>md "pa;th" C:\>echo @echo how the pa;th are ya > "pa;th"\pathme.bat C:\>pathme 'pathme' is not recognized as an internal or external command, operable program or batch file. C:\>set path="pa;th";%path% C:\>pathme how the pa;th are ya C:\>md "pa;th"\"of space" C:\>echo @echo how the pa;th\of space are ya > "pa;th\of space"\pathe +m.bat C:\>pathem 'pathem' is not recognized as an internal or external command, operable program or batch file. C:\>set path="pa;th"\"of space";%path% C:\>pathem how the pa;th\of space are ya C:\>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://933624]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2020-10-31 08:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (287 votes). Check out past polls.

    Notices?