Bug 362274 - Local files treated as URLs when more than one is placed on command line
Summary: Local files treated as URLs when more than one is placed on command line
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-26 01:47 UTC by Brendon Higgins
Modified: 2017-09-08 20:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brendon Higgins 2016-04-26 01:47:29 UTC
If more than one local image filename is given on the command line when starting Gwenview, Gwenview generates a .desktop file for each of them in a folder in /tmp attempting to link to the files' names but with "http://" prepended. It seem to be attempting to interpret the filenames as http URLs. Gwenview opens in browse mode inside the tmp folder, but fails to display any images.

This bug is closely related to bug #340418 (I was tempted to leave a comment there, but given that bug's age and the fact that it does mention only loading one local file, I decided to file a new bug). That bug was fixed, but if you look at the diff and the surrounding code, you quickly see that the case where multiple files are given on the command line is a separate code path that nevertheless has the same issue, unpatched, and ought to receive a similar fix.

Reproducible: Always

Steps to Reproduce:
1. In a terminal, run gwenview with more than one local file given in the arguments.
2. Observe gwenview start but not load any images. Take a look in gwenview's folder under /tmp to see the .desktop files it created.

Actual Results:  
Gwenview starts but not load any images. gwenview's folder under /tmp has a bunch of .desktop files  referring to http://[a filename here].

Expected Results:  
Gwenview shows images because the /tmp folder contains symlinks to the local files.
Comment 1 Nate Graham 2017-09-08 19:36:10 UTC
Interesting bug. I can't reproduce it in KDE Neon with Gwenview 17.11.70, though. Gwenview properly opens showing both files, and no .desktop files appear in /tmp.
Comment 2 Brendon Higgins 2017-09-08 20:01:21 UTC
Still reproducible with the packages in Debian testing, but investigating the git logs, it looks like commit 3d0531c0f253e469126b463f0dfb374a19dee641 by Antonio Larrosa (now almost a year ago!) most likely has addressed this bug. Good to know. Thanks!