EMULAB Forum
clrmamepro [English] => clrmame Discussion => Topic started by: Zandro on 17 January 2013, 13:21
-
Dat entry:
<game name="@rkanoid Beta V0.01 by Ducker (PD)">
<rom name="@rkanoid Beta V0.01 by Ducker (PD).GBA" crc="<snip>" sha1="<snip>"/>
</game>
7zr.exe: a -y -r -ms=off -mx0 %1 %2
(http://i.imgur.com/l2Xl0.png)
Same result with 7z.exe 9.30. Compress as .zip and .rar work OK. (Rar.exe: a -y -r -ibck -m5 -s- %1 %2)
a -y -r -ms=off -mx0 "%~1" %2 = Same error.
Rebuild log: B:\scan\@rkanoid Beta V0.01 by Ducker (PD).gba [SKIPPED Reason: Create Destination Problem]
a -y -r -ms=off -mx0 "%~1" "%~2" = the rom is counted as being created in post-rebuild statistics but the archive isn't found anywhere... apparently built into the nether.
B:\scan\@rkanoid Beta V0.01 by Ducker (PD).gba
-> @rkanoid Beta V0.01 by Ducker (PD).7z\@rkanoid Beta V0.01 by Ducker (PD).GBA
a -y -r -ms=off -mx0 %1 "%~2" = archive is created in destination, but no entry added. Only 32bytes of 7z header is written.
a -y -r -ms=off -mx0 "%1" "%~2" = 32byte archive, but filename is truncated after space. (@rkanoid.7z)
a -y -r -ms=off -mx0 %~1 %~2 = counted as created in stats, but no archive in destination.
Changed Dat entry:
<game name="@rkanoid Beta V0.01 by Ducker (PD)">
<rom name="Arkanoid Beta V0.01 by Ducker (PD).GBA"
...Rebuild works fine with a -y -r -ms=off -mx0 %1 %2
Changed Dat entry:
<game name="@rkanoid Beta V0.01 by Ducker (PD)">
<rom name="@rkanoid Beta V0.01 by Ducker (PD).GBA"
...Same error again.
"@" is used in MSBatch to mute output, but only if at the start of a line. It is echo-able. Is there a commandline that can make 7z behave with this character? I cannot find references to this problem elsewhere.
-
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...] [<@listfiles...>]
The @ is used to use a listfile, so I guess 7zip gets confused...
You might try to specify .\%2 as clrmame 7z commandline parameter instead of %2...so maybe you can fool 7z by specifying the "current folder" (cmpro will add the file %2 from a current folder internally...)
..or maybe quotes around %2
-
Yes, a -y -r -ms=off -mx0 %1 .\%2 works! Fool 7z twice, shame on it! Thank you for the quick reply. :)
-
So, can:
a -y -r -ms=off -mx0 %1 .\%2
be used in place of,
a -y -r -ms=off -mx0 %1 %2
Without any undesirable effects.. ?
What about delete & rename.. can the .\ be added ?
Is it needed.. could it be useful ?
-
I need to check when and where this is called. Usually cmpro moves a single file into a temporary folder, changes to that folder and calls the add or delete operation. That's why .\ doesn't harm in front of the filename since it is already "local directory".
If I remember correctly there is one case where cmpro adds multiple files...but even then it most likely only does a .\* then....
-
hmm...actually it should already handle @ at the beginning automatically....I've added an internal .\ fix for filenames starting with @ a long time ago...wonder why it did not work for the mentioned files...need to double check this.
And yes, currently it tries to remove the 'new_name' files first in case of a rename operation.....guess I can change this easily to do this only if the new_name does exist.
-
ok I've checked the code and I can't repeat an issue with @ at filename start...so an added .\ is obsolete in my opinion... all operations (add, delete, rename) check (in case of 7z/7Z extension) if filenames start with an @....and in that case it automatically adds .\
So Zandro, can you send me a scenario (cmpro.ini, *.dat, *.cmp and the rom files in question) where I can repeat your issue?
-
PM sent.
-
thanks...I found the reason :) Actually cmpro does test if the filename starts with an @ and automatically adds a .\ in front of it....however in your case, the filenames got spaces and cmpro automatically adds quotes around them...and then the @ test fails :)
Will be fixed in the next version, thanks for sending such a good scenario....till then you can safely use the .\%2 workaround
-
Great, thanks again! Cheers!