VOGONS


First post, by exofreeze

User metadata
Rank Member
Rank
Member

In my SVN the command
cd .\folder\folder (with folder be a stand-in for an arbitrary folder name)

does not work. However this command works fine in 0.74.

To get it to work in svn I have to type cd folder\folder

is this a temporary issue that will be fixed when 0.75 releases? If not, it breaks all my batch files I have written within 0.74

Reply 1 of 8, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I created a three-level folder structure. If I type "cd .\folder\folder" from C:\ my default becomes C:\FOLDER\FOLDER, and if type the same command from C:\FOLDER my default becomes C:\FOLDER\FOLDER\FOLDER. So, I'm not seeing any problem here with current SVN source.

Please, whenever possible (meaning almost always), provide more details about problems than "it doesn't work".

What operating system are you on?
Did you compile SVN source, or where did you get the SVN build from?
What was the *exact* MOUNT command you used to mount the drive where you're having the problem?
What actually happens when you execute the command compared to what happens in 0.74?

Reply 2 of 8, by Joey_sw

User metadata
Rank Oldbie
Rank
Oldbie

i do find differences in handling:

Its wether you add trailing backslash \ or not.
But since i'm on WinXP, i'm no-longer able to verify with true DOS handling.

cd .\folder\folder
and
cd .\folder\folder\

above will have different result on SVN and plain 0.74
adding trailing backslash works on plain 0.74 but will fail on SVN (unable to change to: ...)

-fffuuu

Reply 3 of 8, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

If a trailing backslash on the path when changing the default directory is the issue (the thread starter did not mention that or use it in an example) then the behavior was intentionally changed to be more compatible. In MS-DOS 5/6 the rule is: a trailing backslash is only valid if the path resolves to the root. For example, "cd ..\" is valid from one level down because it resolves to the root, but it is not valid from two levels down because it resolves to a subdirectory.

Reply 4 of 8, by exofreeze

User metadata
Rank Member
Rank
Member

Ok, I thought my post was self explanatory, however apparently it was not.

I am using an SVN build from the http://www.dosbox.com/wiki/SVN_Builds website.

I am on Win 7 x64.

Joey_sw is correct. Upon trying it several different ways, it does seem to be the trailing backslash that does not work.

This change breaks hundreds (possible over a thousand) of batch files I have written, and there is no easy way to simply go back and run a text search to find the ones that have a trailing backslash or to remove it.

Reply 5 of 8, by Joey_sw

User metadata
Rank Oldbie
Rank
Oldbie

some command.com replacement (4DOS or Norton NDos) were meant to sit-on exisiting ms-dos
if those replacement works under dosbox svn, (never tested on dosbox)
i wonder if they more lenient about trailling backslash ?

or usng CHDDIR as replacement for "cd" command in batch files
link: http://www.procon.com.au/Files/UT/MSDOS/CHDDIR.htm
it does accepts directories with or without trailling
but,.... this one somehow annoying, you'll know after you try it ...

-fffuuu

Reply 6 of 8, by exofreeze

User metadata
Rank Member
Rank
Member

Thank you for the suggestion, however it is impractical for me to go back and try to replace ever CD command I have written with an alternate utility. I'll just have to stick with 0.74 and only use 0.75/SVN versions when they provide a clear benefit that is worth upgrading that specific entry.[/list]

Reply 7 of 8, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Interesting problem.
Guess SHELL_CMDS::CHDIR could strip of slashes. I recall the change that changes this behaviour to be more compatible, was in the internal functions and not in the shell.
It is a tricky thing...

Water flows down the stream
How to ask questions the smart way!

Reply 8 of 8, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The change was made to fix the "Dactylus" installer, but it is only necessary at the function level.

In MS-DOS the trailing backslash behavior is applied to both the command line and the function call, but DOSBox could depart from the compatible behavior at the shell level if no game is known to rely on it.