I corrected the code as suggested
and added some test cases
On Thu, 2011-08-11 at 14:03 +0200, Frédéric Delanoy wrote:
> On Thu, Aug 11, 2011 at 05:19, Nowres Rafid wrote:
> > Hello,
> >
> > the command "cd .. " doesn't work when there is extra spaces at the end.
> >
> > I propose this patch a
2011/8/11 Nowres Rafid :
> here we change the "command"
>
> if (CompareStringW(LOCALE_USER_DEFAULT,
> NORM_IGNORECASE | SORT_STRINGSORT,
> command, 2, parmD, -1) == 2) {
> command += 2;
> while (*command && *command==' ') command++;
> }
>
> that
2011/8/11 Nowres Rafid :
> where is the code that eliminates extra spaces after normal directories
> name?
> (because "cd dir " works)
Don't know. You'll have to find yourself, possibly by running with cmd
debug channel and/or debugger
Frédéric
On Thu, Aug 11, 2011 at 05:19, Nowres Rafid wrote:
> Hello,
>
> the command "cd .. " doesn't work when there is extra spaces at the end.
>
> I propose this patch and ask for your confirmation about it.
>
> best regards.
}
else {
+
+/* Remove any space at the end of command
+Th
You need to write tests for as many cases you can think of. eg cd .,
cd .., some invalid directories and so on. Im not familiar with the
cmd code but this feels like a bit of a hack.
Jerome
On Thu, Aug 11, 2011 at 6:19 AM, Nowres Rafid wrote:
> Hello,
>
> the command "cd .. " doesn't work when
Hello,
the command "cd .. " doesn't work when there is extra spaces at the
end.
I propose this patch and ask for your confirmation about it.
best regards.
>From f4b4581273704ccf6e67f7595f1c3e4243ed7559 Mon Sep 17 00:00:00 2001
From: Nowres Rafid
Date: Thu, 11 Aug 2011 03:11:26 +
Subject: