Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: CleanPath

by Anonymous Monk
on Oct 25, 2011 at 13:39 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://933624]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (9)
As of 2024-04-23 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found