GNOME Bugzilla – Bug 415663
Filename not quoted when calling cdrecord
Last modified: 2009-07-29 10:46:11 UTC
That bug has been opened on https://launchpad.net/ubuntu/+source/nautilus-cd-burner/+bug/83573 "Binary package hint: nautilus-cd-burner Using Serpentine, which uses nautilus-cd-burner (see bug #79436 in Serpentine package), if I add a file named, for example (quotes for clarity) "03. Salsa.wav" to the main window, nautilus-cd-burner ends using that name (without the quotes) when calling cdrecord, actually "breaking" the command line. Example of real life: mirta@selene:~$ serpentine --debug launching command: cdrecord fs=16m dev=/dev/hdc -eject driveropts=burnfree -v -copy -audio -pad /home/mirta/tmpAhl1nw.wav -copy -audio -pad /home/mirta/tmpGR3NXF.wav -copy -audio -pad /home/mirta/music/03. Salsa.wav -copy -audio -pad /home/mirta/tmpLVZAYK.wav -copy -audio -pad /home/mirta/tmpBlpZrl.wav -copy -audio -pad /home/mirta/tmpzlfGT8.wav -copy -audio -pad /home/mirta/tmpU86ZnR.wav ....... That leads to cdrecord giving a cryptic message of error (No such file or directory. Cannot open ''.). If I call cdrecord with the same as before but that problematic filename quoted, like the following sentence, everything goes ok: cdrecord fs=16m dev=/dev/hdc -eject driveropts=burnfree -v -copy -audio -pad /home/mirta/tmpAhl1nw.wav -copy -audio -pad /home/mirta/tmpGR3NXF.wav -copy -audio -pad "/home/mirta/music/03. Salsa.wav" -copy -audio -pad /home/mirta/tmpLVZAYK.wav -copy -audio -pad /home/mirta/tmpBlpZrl.wav -copy -audio -pad /home/mirta/tmpzlfGT8.wav -copy -audio -pad /home/mirta/tmpU86ZnR.wav ....... Regards,"
Created attachment 86866 [details] [review] patch that doesn't work My initial thought was that we should explicitly quote the filenames. That attached patch does that. However, it doesn't seem to work. When I test it with Rhythmbox I get this: launching command: cdrecord fs=16m speed=4 dev=/dev/scd0 -dao -v -copy -audio -pad '/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.D6U1QT.wav' -copy -audio -pad '/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.NZ68QT.wav' -copy -audio -pad '/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.TBA0QT.wav' -copy -audio -pad '/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.H209QT.wav' -copy -audio -pad '/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.ZU0UQT.wav' -copy -audio -pad '/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.XF0ART.wav' -copy -audio -pad '/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.8WB7QT.wav' -copy -audio -pad '/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.6J55QT.wav' -copy -audio -pad '/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.UDMBRT.wav' -copy -audio -pad '/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.AKMRQT.wav' cdrecord stderr: cdrecord: No such file or directory. Cannot open ''/tmp/rb-burn-tmp-4pIHqb/rb-burn-tmp.D6U1QT.wav''.
Also, the docs are a bit unclear whether we should be quoting or not: http://developer.gnome.org/doc/API/2.0/glib/glib-Spawning-Processes.html#g-spawn-async-with-pipes
nautilus-cd-burner has been replaced by Brasero in the GNOME 2.26 release. If your bug still applies to Brasero, please feel free to re-open the bug, and reassign it to brasero itself.