[FIXED] AppImage wrapper script can't take filenames with spaces

Started by FeRD_NYC, September 05, 2018, 02:17:18 PM

Previous topic - Next topic

FeRD_NYC

Using avidemux_2.7.1v2.appImage downloaded from the official site.

If I try to pass a filename with spaces in it when launching from the command line, avidemux fails to open the file.

Steps to reproduce:
1. Copy any supported video file to e.g. "/tmp/test video.mp4"
2. Launch avidemux:
$ /path/to/avidemux_2.7.1v2.appImage "/tmp/test video.mp4"


Expected results:
Video loads


Actual results:
An error dialog reporting...
QuoteFile Error
"/tmp/test" does not exist.

I've tried "/tmp/test\ video.mp4", "/tmp/test\\ video.mp4", "/tmp/test\\\ video.mp4", and all that nets me is an increasing number of backslashes following "/tmp/test" in the error dialog. The wrapper script is impressively resilient against my efforts to convince it that spaces are its friend.

Needless to say, if the filename is /tmp/testvideo.mp4 it opens from the command line with no problems.

eumagga0x2a

I'm surprised it loads without the --load option at all.

FeRD_NYC

#2
Quote from: eumagga0x2a on September 05, 2018, 03:21:41 PM
I'm surprised it loads without the --load option at all.

Huh, I guess I never knew there was a --load option. The executable would have to take file paths as bare positional arguments, since the .desktop file contains just:
Exec=avidemux3_qt5
so that's how the desktop environment's "Open with Avidemux" would be supported.

Regardless, I can further report that running
$ /path/to/avidemux_2.7.1v2.appImage --load "/tmp/test video.mp4"
(or with any number of backslashes preceding the space) has exactly the same problem.


eumagga0x2a

Please try the latest nightly (180905_150 so far) and report back whether it fixes the problem.

FeRD_NYC

#5
Wow, I really need to sort out email notification on this forum. Regardless, two months later...

Confirmed. With the latest October 30 AppImage build, both of these command lines:

$ /var/tmp/avidemuxUniversal_amd64_181030_158.app /tmp/test\ vid.mp4
$ /var/tmp/avidemuxUniversal_amd64_181030_158.app "/tmp/test vid.mp4"


...successfully load the video. Thanks!

ETA: (So... turns out, if you don't have notification turned on for a post, you don't get notified. Crazy, right? #PEBKAC)