Author Topic: [FIXED] AppImage wrapper script can't take filenames with spaces  (Read 400 times)

FeRD_NYC

  • Newbie
  • *
  • Posts: 38
[FIXED] AppImage wrapper script can't take filenames with spaces
« on: September 05, 2018, 02:17:18 PM »
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:
Code: [Select]
$ /path/to/avidemux_2.7.1v2.appImage "/tmp/test video.mp4"

Expected results:
Video loads


Actual results:
An error dialog reporting...
Quote
File 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.
« Last Edit: November 11, 2018, 10:42:54 AM by FeRD_NYC »

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2296
Re: AppImage wrapper script can't take filenames with spaces
« Reply #1 on: September 05, 2018, 03:21:41 PM »
I'm surprised it loads without the --load option at all.

FeRD_NYC

  • Newbie
  • *
  • Posts: 38
Re: AppImage wrapper script can't take filenames with spaces
« Reply #2 on: September 05, 2018, 04:08:36 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:
Code: [Select]
Exec=avidemux3_qt5so that's how the desktop environment's "Open with Avidemux" would be supported.

Regardless, I can further report that running
Code: [Select]
$ /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.
« Last Edit: September 05, 2018, 04:11:25 PM by FeRD_NYC »

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2296
Re: AppImage wrapper script can't take filenames with spaces
« Reply #3 on: September 05, 2018, 04:24:18 PM »

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2296
Re: AppImage wrapper script can't take filenames with spaces
« Reply #4 on: September 05, 2018, 08:40:56 PM »
Please try the latest nightly (180905_150 so far) and report back whether it fixes the problem.

FeRD_NYC

  • Newbie
  • *
  • Posts: 38
Re: AppImage wrapper script can't take filenames with spaces
« Reply #5 on: November 11, 2018, 10:35:47 AM »
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:
Code: [Select]
$ /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)
« Last Edit: November 11, 2018, 10:44:23 AM by FeRD_NYC »