[ros-bugs] [Bug 4013] cmd doesn't handle .. and . well
ReactOS.Bugzilla at www.reactos.org
ReactOS.Bugzilla at www.reactos.org
Thu Jan 15 12:16:03 CET 2009
http://www.reactos.org/bugzilla/show_bug.cgi?id=4013
--- Comment #10 from vicmarcal <vicmarcal at hotmail.com> 2009-01-15 12:16:02 CET ---
Yes,problem in in Split arguments and because Split is wrongly "/" based:
******Expected Behavior***
D:\Hola\subsystems\csr\csrsrv>move HELLO.as ../
arg[argc-1]:../
arg[argc-2]:HELLO.as
******Reactos Splitting WRONG behavior***
D:\Hola\subsystems\csr\csrcv>move HELLO.as ../
arg[argc-1]:/
arg[argc-2]:..
(Which mess everything)
***************************************************************************
Adding more info about our Split wrongly "/" based:
Seems our Split is Splitting when finding "/" and " ".
I think our Split should split arguments when finding just " "(spaces).After
that it should check if first argument has "/",if so splitting that first
argument in more arguments so:
move /N c:\this\is\an\example.txt c:\this\not
-First splitting:4args (first arg has /).Final splitting:4args
move/N c:\this\is\an\example.txt c:\this\not
-First splitting:3args (first arg has one"/": one more arg). Final
splitting:4args
So can be both understand(as XP cmd.exe does)
Splitting with spaces will make us less "/"-dependent.Because XP CMD.exe isnt
"/"-dependent at all.
Another wrong issue because splitting with a "/"-dependent code:
******XP CMD.exe behavior****
move C:\this/is\a/mess\of/slashes.txt C:\yes/in\Xp/this\works/
It moves slashes.txt from C:\this\is\a\mess\of\ to C:\yes\in\Xp\this\works
(XP just uses "\"or "/" indistinctly as signs to split Directories in the
Path.)
(This is the main reason why we cant use "/"-dependent code)
******Reactos CMD.exe Behavior****
move C:\this/is\a/mess\of/slashed.txt C:\yes/this\doesnt/work/inROS
It gives a "Syntax error- C:\this"
Thanks to arrive to this last line ;)
--
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the Ros-bugs
mailing list