Open rbouqueau opened 10 years ago
Commented by jeanlf on 2014-05-12 11:58 UTC Hmm which platform are you using ? latest SVN works fine for that on windows/OSX/ubuntu ...
Commented by julianmayer on 2014-05-12 12:19 UTC i'm on Mac OS X 10.9.2
SVN r5244
Commented by jcdufourd on 2014-05-14 08:06 UTC I'm also using Mac OSX 10.9.2, on r5254 now. I confirm the bug, but not with that command line. I have tried with a file whose track 3 is enabled, so I need to -disable it to get mp4box to rewrite the file.
Commented by julianmayer on 2014-05-14 08:34 UTC yes the problem only happens when the file is actually modified and written out. need to use "enable" or "disable" to make sure a change is actually ocurring.
Commented by rbouqueau on 2014-05-14 09:12 UTC I know what happens. Our rename function internally relies on "mv 'file1' 'file2'". Look at the quotes. So if your filename includes a single quote, it indeed doesn't work.
NB: we needed to rely on "mv" otherwise changes to different filesystems were not taken correctly into account.
NB2: commit adding the quotes https://sourceforge.net/p/gpac/code/4410/
Does any of you can see an easy way to fix this?
Commented by julianmayer on 2014-05-14 09:23 UTC if you 1.) change the MV command to use double quotes instead of single quotes 2.) make sure the filenames are properly escaped with backslashes (perhaps this already is done?)
it should work. tested ad-hoc on the command line
Commented by rbouqueau on 2014-05-14 12:50 UTC Ok, that's much complex than that. If you set double-quote, the system() function (which relies on '/bin/sh' on Unix) may interpret many symbols which is not security-proof.
I'm having a look...
Commented by rbouqueau on 2014-05-14 13:20 UTC I made this: http://sourceforge.net/p/gpac/code/5255
Can you confirm it solves the issue?
Commented by julianmayer on 2014-05-14 13:46 UTC thanks this fixes the issue for me.
since the "Error renaming file" errors seem to crop up every few years on different platforms, perhaps files with exotic filenames could be added to the testsuite
“}Ωª}a a“¡ª¡“¶¢®¢.mp4 "œƒ@∑∆¡||¡ ±±-.mp4 Óӈω'⁄⁄⁄///77||||\.mp4
;)
Reported by julianmayer on 2014-05-07 20:08 UTC mp4box (svn trunk as of today as well as older versions) is unable to process files that contain a apostrophe (') in the filename:
$ ./MP4Box -v -enable 3 "test'.mp4" Saving test'.mp4: 0.500 secs Interleaving Error renaming file out_test'.mp4 to test'.mp4
please fix this or give me a hint how to do it myself