Hi,
When using dsave, for creating folders, makdir is used. I think it should be mkdir.
Also, on Windows 10, the wrong separator is outputed for separating destination folders, '/' instead of '\'.
Awesome tool, thanks a lot!
Anonymous
Ok, after looking a bit around the code the use of makdir seems ok, and for some reason the paths are also correct now, but the copy command looks like this:
which throws on Windows 10 an error:
For testing, if I use:
without quotes, the command executes okay, without errors.
Yes, I think makdir is the classic OS/9 name. This is not unix! :)
I think the quotes are added just in case there are spaces or dollar signs in the file paths. And they would work if you use any kind of command shell other than the "DOS" cmd.exe., like a Bash shell or something from MinGW/MSYS or Cygwin. BTW I would anyway recommend using e.g . Bash shell (included in e.g. Git for Windows) if you do command line work on Windows.
We could make dsave more sophisticated and only add quotes if it seems needed.
Hoping you'll take another look at this. I'm not the original opener of the ticket, but the quotes issue has been a problem for me on Windows 10 as well, and I found this ticket. Running on vanilla DOS and CygWin both yield:
D:\coco\disks>decb dsave -e Working.dsk, moon\Working
decb copy 'Working.dsk,DIGDUG.BAS' 'moon\Working/DIGDUG.BAS'
copy: error 215
dsave: error 215 encountered during dsave
(to even get this far on CygWin, I do need to replace \ with /; I also tried on PowerShell, but the comma really throws it off and that entire portion of the dsave command needs to be enclosed in double-quotes just to get the error 215; I do not have git for Windows bash installed).
If I manually attempt the generated decb copy command on vanilla DOS, I get 215, if I replace ' with " it works.
If I manually attempt the generated decb copy command on cygwin, it DOES work. (but dsave does not!) Cygwin session example:
[machinename] /cygdrive/d/coco/disks
$ decb dsave -e Working.dsk, moon/Working
decb copy 'Working.dsk,DIGDUG.BAS' 'moon/Working/DIGDUG.BAS'
copy: error 215
dsave: error 215 encountered during dsave
[machinename] /cygdrive/d/coco/disks
$ decb copy 'Working.dsk,DIGDUG.BAS' 'moon/Working/DIGDUG.BAS'
[machinename] /cygdrive/d/coco/disks
(you'll notice, no error reported after last command).
Issue with vanilla DOS seems clear: If you just change dsave to use double-quote " instead of single-quote ' then all would likely be fine on a vanilla DOS prompt. Don't need to be smart about whether quotes are needed. Just use double-quotes when on Windows.
Issue with cygwin is unclear. Why decb dsave fails, but the exact same decb copy command directly works is odd.
+1 for double-quotes on vanilla DOS. os9 dsave has received more attention than decb dsave over the last years, and a "recent" (3 years old in source repo but unreleased) change is that os9 dsave chooses double-quotes for non-POSIX shells. It still uses single-quotes on POSIX shells, IIRC to allow e.g. dollars in path names, that otherwise would be wrongly substituted by the shell.
By the way, the -e option is difficult to get correct in all situations, since it spawns a command interpreter using system() , which for example on MinGW means that CMD.EXE is called even if the original dsave command was launched from a POSIX shell. This shouldn't be a problem in CygWin though.
os9 dsave should handle all kind of source and destination formats, whether RBF, DECB, CECB or native. Can you please try using os9 dsave for your copy task and see how that works?
Unfortunately, same problem. (This is all with the latest released 2.2 build, btw.)
On vanilla DOS:
D:\coco\disks>os9 dsave Working.dsk, moon\Working -l -e
os9 copy 'Working.dsk,DIGDUG.BAS' 'moon\Working/DIGDUG.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,DIGDUG.BAS'': badly formed pathname
(output continues with error for each file in .dsk)
Manually pasting a generated os9 copy command also fails:
D:\coco\disks>os9 copy 'Working.dsk,DIGDUG.BAS' 'moon\Working/DIGDUG.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,DIGDUG.BAS'': badly formed pathname
On CygWin:
[machinename] /cygdrive/d/coco/disks
$ os9 dsave Working.dsk, moon/Working -l -e
os9 copy 'Working.dsk,DIGDUG.BAS' 'moon/Working/DIGDUG.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,DIGDUG.BAS'': badly formed pathname
(output continues with error for each file in .dsk)
Manually pasting a generated os9 copy command succeeds:
[machinename] /cygdrive/d/coco/disks
$ os9 copy 'Working.dsk,DIGDUG.BAS' 'moon/Working/DIGDUG.BAS' -l -b=32768
Please test using the latest snapshot at https://toolshed.sourceforge.net/snapshots/ A lot of the dsave rework came after 2.2.
Aha. Now...
On both vanilla DOS and cygwin, the DECB dsave command works great!
On vanilla DOS, the os9 dsave works great.
Oddly, on cygwin, the os9 dsave continues to give the same error 215 / badly formed pathname error. I investigated further, since I don't know much about cygwin. My start-menu icon for cygwin runs
C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -
If I manually run that command line to generate my cygwin prompt, os9 dsave continues to fail.
If I manually run that command line BUT OMIT the ending dash to generate my cygwin prompt, then os9 dsave succeeds(!). According to "man mintty" the ending dash causes mintty to invoke the shell as a "login shell". Neither the man page nor my rudimentary Googling clarified for me what "login shell" means in this context. According to task manager, mintty is always launched as me, non-elevated, never as some seprate administrator account, regardless of whether the ending dash is specified. The path is also the same (only the latest snapshot of toolshed exists on any path, which I confirmed with a WHERE command). Perhaps their use of the term "login shell" means something to you?
Yes, "login shell" means the first shell you get when you log in. In this shell, files like /etc/profile and .bash_profile will be sourced at the start. Other shells are created when running shell scripts (a non-interactive shell), or when opening terminal windows in a GUI login (interactive shell). Then typically only /etc/bashrc and .bashrc are read. Other shells than bash might have slightly different rules.
If you run
setin your two cases, you'll probably see a difference.In particular, please check whether the SHELL environment variable is set:
env | grep SHELLThis is the variable that os9 dsave is probing to see if it is called from a POSIX shell. It is not a 100% safe check, but a pretty good guess. Maybe it is wrong in the case of a mintty login shell?
BTW,
man bash | less +/^INVOCATIONexplains what the login shell means for bash.Results of commands run in different cygwin cmd prompts:
env | grep SHELL:
login shell, dsave not working: SHELL=/bin/bash
non-login shell, dsave working: (no output)
set | grep SHELL:
both SHELL and SHELLOPTS are set identically in both login & non-login shells:
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
Dunno why env and set are giving different results. Does this explain the behavior to you?
Please disregard what I said about
decb dsaveversusos9 dsaveimprovements. decb dsave actually just calls into the os9 dsave code, so the results should be the same. Which they also were for your 2.2 trials. I don't understand why there is a difference between the two on cygwin, when using the snapshot builds.I don't know the reasoning behind mintty only exporting SHELL from login shells, but it is likely why we see a difference in dsave. With
mintty -it will be a login shell so SHELL is exported and dsave will use single quotes. I would have expected this to work (like it does on Linux). In your case, without any dollar signs in the file paths, double-quotes work fine, as expected.So what you are seeing is:
mintty without - so non-login shell, no SHELL env var, will use
"-> dsave worksmintty with - so login shell, has SHELL env var, will use
'-> dsave failsCan you please paste in the command line output so we can verify that the above reflects what you are seeing? Or did we get something the wrong way around?
Note also that the snapshot binaries are primarily meant for non-cygwin environments, and the SHELL detection is to differentiate CMD.exe vs bash shells. Building binaries on and for a cygwin environment should rather build without any SHELL detection, and always use single quotes, like on other POSIX platforms. It is therefore important to find out what goes wrong here.
Last edit: Tormod Volden 2023-08-21
Yeah, I'd be happy to send you more info. Could you be more specific on exactly which commands and which environments you want to see command line output for?
Thanks, I'd like to see on Cygwin, using snapshot builds, both with login shell and non-login shell:
Here you, apologies for the long output!
**** login shell, os9 dsave Working.dsk, moon/Working -l -e
os9 copy 'Working.dsk,DIGDUG.BAS' 'moon/Working/DIGDUG.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,DIGDUG.BAS'' to ''moon/Working/DIGDUG.BAS'
': badly formed pathname
os9 copy 'Working.dsk,CAR.BAS' 'moon/Working/CAR.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,CAR.BAS'' to ''moon/Working/CAR.BAS'': bad
ly formed pathname
os9 copy 'Working.dsk,VELMA.BAS' 'moon/Working/VELMA.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,VELMA.BAS'' to ''moon/Working/VELMA.BAS'':
badly formed pathname
os9 copy 'Working.dsk,TTSCORES.T10' 'moon/Working/TTSCORES.T10' -l -b=32768
copy: error 215 on file ''Working.dsk,TTSCORES.T10'' to ''moon/Working/TTSCORES.
T10'': badly formed pathname
os9 copy 'Working.dsk,DIVIDE.SRC' 'moon/Working/DIVIDE.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,DIVIDE.SRC'' to ''moon/Working/DIVIDE.SRC'
': badly formed pathname
os9 copy 'Working.dsk,CREATOR.TPE' 'moon/Working/CREATOR.TPE' -l -b=32768
copy: error 215 on file ''Working.dsk,CREATOR.TPE'' to ''moon/Working/CREATOR.TP
E'': badly formed pathname
os9 copy 'Working.dsk,CREATE.BAS' 'moon/Working/CREATE.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,CREATE.BAS'' to ''moon/Working/CREATE.BAS'
': badly formed pathname
os9 copy 'Working.dsk,WHATEVER.SRC' 'moon/Working/WHATEVER.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,WHATEVER.SRC'' to ''moon/Working/WHATEVER.
SRC'': badly formed pathname
os9 copy 'Working.dsk,MOONPIC.BAS' 'moon/Working/MOONPIC.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,MOONPIC.BAS'' to ''moon/Working/MOONPIC.BA
S'': badly formed pathname
os9 copy 'Working.dsk,ROTATE.SRC' 'moon/Working/ROTATE.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,ROTATE.SRC'' to ''moon/Working/ROTATE.SRC'
': badly formed pathname
os9 copy 'Working.dsk,MOVERT.SRC' 'moon/Working/MOVERT.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,MOVERT.SRC'' to ''moon/Working/MOVERT.SRC'
': badly formed pathname
os9 copy 'Working.dsk,CONVERT.SRC' 'moon/Working/CONVERT.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,CONVERT.SRC'' to ''moon/Working/CONVERT.SR
C'': badly formed pathname
os9 copy 'Working.dsk,SCORE.SRC' 'moon/Working/SCORE.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,SCORE.SRC'' to ''moon/Working/SCORE.SRC'':
badly formed pathname
os9 copy 'Working.dsk,MOVEUP.SRC' 'moon/Working/MOVEUP.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,MOVEUP.SRC'' to ''moon/Working/MOVEUP.SRC'
': badly formed pathname
os9 copy 'Working.dsk,NOTHERE.SRC' 'moon/Working/NOTHERE.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,NOTHERE.SRC'' to ''moon/Working/NOTHERE.SR
C'': badly formed pathname
os9 copy 'Working.dsk,ZA.BAS' 'moon/Working/ZA.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,ZA.BAS'' to ''moon/Working/ZA.BAS'': badly
formed pathname
os9 copy 'Working.dsk,MOONPIC1.BIN' 'moon/Working/MOONPIC1.BIN' -l -b=32768
copy: error 215 on file ''Working.dsk,MOONPIC1.BIN'' to ''moon/Working/MOONPIC1.
BIN'': badly formed pathname
os9 copy 'Working.dsk,PSET.SRC' 'moon/Working/PSET.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,PSET.SRC'' to ''moon/Working/PSET.SRC'': b
adly formed pathname
os9 copy 'Working.dsk,MOVEDOWN.SRC' 'moon/Working/MOVEDOWN.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,MOVEDOWN.SRC'' to ''moon/Working/MOVEDOWN.
SRC'': badly formed pathname
os9 copy 'Working.dsk,ZARUNME.BAS' 'moon/Working/ZARUNME.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,ZARUNME.BAS'' to ''moon/Working/ZARUNME.BA
S'': badly formed pathname
os9 copy 'Working.dsk,NUMBERS.BIN' 'moon/Working/NUMBERS.BIN' -l -b=32768
copy: error 215 on file ''Working.dsk,NUMBERS.BIN'' to ''moon/Working/NUMBERS.BI
N'': badly formed pathname
os9 copy 'Working.dsk,MOONPIC2.BIN' 'moon/Working/MOONPIC2.BIN' -l -b=32768
copy: error 215 on file ''Working.dsk,MOONPIC2.BIN'' to ''moon/Working/MOONPIC2.
BIN'': badly formed pathname
os9 copy 'Working.dsk,WHEEL.SRC' 'moon/Working/WHEEL.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,WHEEL.SRC'' to ''moon/Working/WHEEL.SRC'':
badly formed pathname
os9 copy 'Working.dsk,TRIAL2.BIN' 'moon/Working/TRIAL2.BIN' -l -b=32768
copy: error 215 on file ''Working.dsk,TRIAL2.BIN'' to ''moon/Working/TRIAL2.BIN'
': badly formed pathname
os9 copy 'Working.dsk,SHLAMELE.SRC' 'moon/Working/SHLAMELE.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,SHLAMELE.SRC'' to ''moon/Working/SHLAMELE.
SRC'': badly formed pathname
os9 copy 'Working.dsk,ENEMY1.BAS' 'moon/Working/ENEMY1.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,ENEMY1.BAS'' to ''moon/Working/ENEMY1.BAS'
': badly formed pathname
os9 copy 'Working.dsk,NUMRUNME.BAS' 'moon/Working/NUMRUNME.BAS' -l -b=32768
copy: error 215 on file ''Working.dsk,NUMRUNME.BAS'' to ''moon/Working/NUMRUNME.
BAS'': badly formed pathname
os9 copy 'Working.dsk,FROTATE.SRC' 'moon/Working/FROTATE.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,FROTATE.SRC'' to ''moon/Working/FROTATE.SR
C'': badly formed pathname
os9 copy 'Working.dsk,JUMP.SRC' 'moon/Working/JUMP.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,JUMP.SRC'' to ''moon/Working/JUMP.SRC'': b
adly formed pathname
os9 copy 'Working.dsk,MOVELEFT.SRC' 'moon/Working/MOVELEFT.SRC' -l -b=32768
copy: error 215 on file ''Working.dsk,MOVELEFT.SRC'' to ''moon/Working/MOVELEFT.
SRC'': badly formed pathname
os9 copy 'Working.dsk,ENEMY1.BIN' 'moon/Working/ENEMY1.BIN' -l -b=32768
copy: error 215 on file ''Working.dsk,ENEMY1.BIN'' to ''moon/Working/ENEMY1.BIN'
': badly formed pathname
**** login shell, decb dsave Working.dsk, moon/Working -l -e
decb copy "Working.dsk,DIGDUG.BAS" "moon/Working/DIGDUG.BAS" -l
decb copy "Working.dsk,CAR.BAS" "moon/Working/CAR.BAS" -l
decb copy "Working.dsk,VELMA.BAS" "moon/Working/VELMA.BAS" -l
decb copy "Working.dsk,TTSCORES.T10" "moon/Working/TTSCORES.T10" -l
decb copy "Working.dsk,DIVIDE.SRC" "moon/Working/DIVIDE.SRC" -l
decb copy "Working.dsk,CREATOR.TPE" "moon/Working/CREATOR.TPE" -l
decb copy "Working.dsk,CREATE.BAS" "moon/Working/CREATE.BAS" -l
decb copy "Working.dsk,WHATEVER.SRC" "moon/Working/WHATEVER.SRC" -l
decb copy "Working.dsk,MOONPIC.BAS" "moon/Working/MOONPIC.BAS" -l
decb copy "Working.dsk,ROTATE.SRC" "moon/Working/ROTATE.SRC" -l
decb copy "Working.dsk,MOVERT.SRC" "moon/Working/MOVERT.SRC" -l
decb copy "Working.dsk,CONVERT.SRC" "moon/Working/CONVERT.SRC" -l
decb copy "Working.dsk,SCORE.SRC" "moon/Working/SCORE.SRC" -l
decb copy "Working.dsk,MOVEUP.SRC" "moon/Working/MOVEUP.SRC" -l
decb copy "Working.dsk,NOTHERE.SRC" "moon/Working/NOTHERE.SRC" -l
decb copy "Working.dsk,ZA.BAS" "moon/Working/ZA.BAS" -l
decb copy "Working.dsk,MOONPIC1.BIN" "moon/Working/MOONPIC1.BIN" -l
decb copy "Working.dsk,PSET.SRC" "moon/Working/PSET.SRC" -l
decb copy "Working.dsk,MOVEDOWN.SRC" "moon/Working/MOVEDOWN.SRC" -l
decb copy "Working.dsk,ZARUNME.BAS" "moon/Working/ZARUNME.BAS" -l
decb copy "Working.dsk,NUMBERS.BIN" "moon/Working/NUMBERS.BIN" -l
decb copy "Working.dsk,MOONPIC2.BIN" "moon/Working/MOONPIC2.BIN" -l
decb copy "Working.dsk,WHEEL.SRC" "moon/Working/WHEEL.SRC" -l
decb copy "Working.dsk,TRIAL2.BIN" "moon/Working/TRIAL2.BIN" -l
decb copy "Working.dsk,SHLAMELE.SRC" "moon/Working/SHLAMELE.SRC" -l
decb copy "Working.dsk,ENEMY1.BAS" "moon/Working/ENEMY1.BAS" -l
decb copy "Working.dsk,NUMRUNME.BAS" "moon/Working/NUMRUNME.BAS" -l
decb copy "Working.dsk,FROTATE.SRC" "moon/Working/FROTATE.SRC" -l
decb copy "Working.dsk,JUMP.SRC" "moon/Working/JUMP.SRC" -l
decb copy "Working.dsk,MOVELEFT.SRC" "moon/Working/MOVELEFT.SRC" -l
decb copy "Working.dsk,ENEMY1.BIN" "moon/Working/ENEMY1.BIN" -l
**** non-login shell, os9 dsave Working.dsk, moon/Working -l -e
os9 copy "Working.dsk,DIGDUG.BAS" "moon/Working/DIGDUG.BAS" -l -b=32768
os9 copy "Working.dsk,CAR.BAS" "moon/Working/CAR.BAS" -l -b=32768
os9 copy "Working.dsk,VELMA.BAS" "moon/Working/VELMA.BAS" -l -b=32768
os9 copy "Working.dsk,TTSCORES.T10" "moon/Working/TTSCORES.T10" -l -b=32768
os9 copy "Working.dsk,DIVIDE.SRC" "moon/Working/DIVIDE.SRC" -l -b=32768
os9 copy "Working.dsk,CREATOR.TPE" "moon/Working/CREATOR.TPE" -l -b=32768
os9 copy "Working.dsk,CREATE.BAS" "moon/Working/CREATE.BAS" -l -b=32768
os9 copy "Working.dsk,WHATEVER.SRC" "moon/Working/WHATEVER.SRC" -l -b=32768
os9 copy "Working.dsk,MOONPIC.BAS" "moon/Working/MOONPIC.BAS" -l -b=32768
os9 copy "Working.dsk,ROTATE.SRC" "moon/Working/ROTATE.SRC" -l -b=32768
os9 copy "Working.dsk,MOVERT.SRC" "moon/Working/MOVERT.SRC" -l -b=32768
os9 copy "Working.dsk,CONVERT.SRC" "moon/Working/CONVERT.SRC" -l -b=32768
os9 copy "Working.dsk,SCORE.SRC" "moon/Working/SCORE.SRC" -l -b=32768
os9 copy "Working.dsk,MOVEUP.SRC" "moon/Working/MOVEUP.SRC" -l -b=32768
os9 copy "Working.dsk,NOTHERE.SRC" "moon/Working/NOTHERE.SRC" -l -b=32768
os9 copy "Working.dsk,ZA.BAS" "moon/Working/ZA.BAS" -l -b=32768
os9 copy "Working.dsk,MOONPIC1.BIN" "moon/Working/MOONPIC1.BIN" -l -b=32768
os9 copy "Working.dsk,PSET.SRC" "moon/Working/PSET.SRC" -l -b=32768
os9 copy "Working.dsk,MOVEDOWN.SRC" "moon/Working/MOVEDOWN.SRC" -l -b=32768
os9 copy "Working.dsk,ZARUNME.BAS" "moon/Working/ZARUNME.BAS" -l -b=32768
os9 copy "Working.dsk,NUMBERS.BIN" "moon/Working/NUMBERS.BIN" -l -b=32768
os9 copy "Working.dsk,MOONPIC2.BIN" "moon/Working/MOONPIC2.BIN" -l -b=32768
os9 copy "Working.dsk,WHEEL.SRC" "moon/Working/WHEEL.SRC" -l -b=32768
os9 copy "Working.dsk,TRIAL2.BIN" "moon/Working/TRIAL2.BIN" -l -b=32768
os9 copy "Working.dsk,SHLAMELE.SRC" "moon/Working/SHLAMELE.SRC" -l -b=32768
os9 copy "Working.dsk,ENEMY1.BAS" "moon/Working/ENEMY1.BAS" -l -b=32768
os9 copy "Working.dsk,NUMRUNME.BAS" "moon/Working/NUMRUNME.BAS" -l -b=32768
os9 copy "Working.dsk,FROTATE.SRC" "moon/Working/FROTATE.SRC" -l -b=32768
os9 copy "Working.dsk,JUMP.SRC" "moon/Working/JUMP.SRC" -l -b=32768
os9 copy "Working.dsk,MOVELEFT.SRC" "moon/Working/MOVELEFT.SRC" -l -b=32768
os9 copy "Working.dsk,ENEMY1.BIN" "moon/Working/ENEMY1.BIN" -l -b=32768
**** non-login shell, decb dsave Working.dsk, moon/Working -l -e
decb copy "Working.dsk,DIGDUG.BAS" "moon/Working/DIGDUG.BAS" -l
decb copy "Working.dsk,CAR.BAS" "moon/Working/CAR.BAS" -l
decb copy "Working.dsk,VELMA.BAS" "moon/Working/VELMA.BAS" -l
decb copy "Working.dsk,TTSCORES.T10" "moon/Working/TTSCORES.T10" -l
decb copy "Working.dsk,DIVIDE.SRC" "moon/Working/DIVIDE.SRC" -l
decb copy "Working.dsk,CREATOR.TPE" "moon/Working/CREATOR.TPE" -l
decb copy "Working.dsk,CREATE.BAS" "moon/Working/CREATE.BAS" -l
decb copy "Working.dsk,WHATEVER.SRC" "moon/Working/WHATEVER.SRC" -l
decb copy "Working.dsk,MOONPIC.BAS" "moon/Working/MOONPIC.BAS" -l
decb copy "Working.dsk,ROTATE.SRC" "moon/Working/ROTATE.SRC" -l
decb copy "Working.dsk,MOVERT.SRC" "moon/Working/MOVERT.SRC" -l
decb copy "Working.dsk,CONVERT.SRC" "moon/Working/CONVERT.SRC" -l
decb copy "Working.dsk,SCORE.SRC" "moon/Working/SCORE.SRC" -l
decb copy "Working.dsk,MOVEUP.SRC" "moon/Working/MOVEUP.SRC" -l
decb copy "Working.dsk,NOTHERE.SRC" "moon/Working/NOTHERE.SRC" -l
decb copy "Working.dsk,ZA.BAS" "moon/Working/ZA.BAS" -l
decb copy "Working.dsk,MOONPIC1.BIN" "moon/Working/MOONPIC1.BIN" -l
decb copy "Working.dsk,PSET.SRC" "moon/Working/PSET.SRC" -l
decb copy "Working.dsk,MOVEDOWN.SRC" "moon/Working/MOVEDOWN.SRC" -l
decb copy "Working.dsk,ZARUNME.BAS" "moon/Working/ZARUNME.BAS" -l
decb copy "Working.dsk,NUMBERS.BIN" "moon/Working/NUMBERS.BIN" -l
decb copy "Working.dsk,MOONPIC2.BIN" "moon/Working/MOONPIC2.BIN" -l
decb copy "Working.dsk,WHEEL.SRC" "moon/Working/WHEEL.SRC" -l
decb copy "Working.dsk,TRIAL2.BIN" "moon/Working/TRIAL2.BIN" -l
decb copy "Working.dsk,SHLAMELE.SRC" "moon/Working/SHLAMELE.SRC" -l
decb copy "Working.dsk,ENEMY1.BAS" "moon/Working/ENEMY1.BAS" -l
decb copy "Working.dsk,NUMRUNME.BAS" "moon/Working/NUMRUNME.BAS" -l
decb copy "Working.dsk,FROTATE.SRC" "moon/Working/FROTATE.SRC" -l
decb copy "Working.dsk,JUMP.SRC" "moon/Working/JUMP.SRC" -l
decb copy "Working.dsk,MOVELEFT.SRC" "moon/Working/MOVELEFT.SRC" -l
decb copy "Working.dsk,ENEMY1.BIN" "moon/Working/ENEMY1.BIN" -l
I can confirm that on Windows,
dsavegeneratescopyparameters with single quotes ('):decb copy 'OKBASIC.DSK,TIMER.BAS' './TIMER.BAS'and when executing such command line using CMD, it causes the error 215:
But the same issue occurs when running the same binaries from MSYS/MinGW:
The binaries of the ToolShed are build on Windows using MinGW tools:
GNU C 4.2.1-sjlj (mingw32-2)So the problem is not in the shell or binaries. But possibly by the virtue (or vice) of the C runtime when the call to
system()to execute the generated command line, it involves host processes to parse the command line. (Which may defer back to CMD).It looks like under Windows CMD (non-POSIX OS), the single quote (') is interpreted as a part of the parameter and file name. Whereas the proper parameter quotes are double quotes ("). So the following form of the command line works fine:
So the fix to the issue with error 215 seems to lie in the ability of
dsaveto differentiate non-POSIX OS and use a different command-line quote, the double quote ("), when generating thecopylines. Something like... Please keep reading next comment ...
Last edit: olegyk 2023-11-05
After installing the latest
* snapshot
toolshed-snapshot20230914-win32.zip* from
https://toolshed.sourceforge.net/snapshots/it's all working now
both in Windows CMD
and in MSYS / MingW
Both due to the double quotes (") properly generated.
So I am all set.
Last edit: olegyk 2023-11-05