Bug 694915 - filename quoting problem in livecd-iso-to-disk
Summary: filename quoting problem in livecd-iso-to-disk
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: livecd-tools
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 698070 715262 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-08 20:32 UTC by cam
Modified: 2011-08-11 23:38 UTC (History)
9 users (show)

Fixed In Version: livecd-tools-17.0-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-11 23:38:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch for livecd-iso-to-disk to quote $ISO in case it has unusual characters (1.48 KB, patch)
2011-04-08 22:58 UTC, cam
no flags Details | Diff
f15 branch version of the patch (1.64 KB, patch)
2011-04-09 01:11 UTC, Bruno Wolff III
no flags Details | Diff
Patch for master branch (2.45 KB, patch)
2011-04-09 01:26 UTC, Bruno Wolff III
no flags Details | Diff

Description cam 2011-04-08 20:32:05 UTC
Description of problem:
After downloading an iso with the same name as a previous one, the browser often saves the file with a space and brackets in the new filename, eg.

"/home/cxm/Downloads/Fedora-15-Beta-i686-Live-Desktop (1).iso"

This foxes livecd-iso-to-disk:

/usr/bin/livecd-iso-to-disk: line 576: [: /home/cxm/Downloads/Fedora-15-Beta-i686-Live-Desktop: binary operator expected
/usr/bin/livecd-iso-to-disk: line 578: [: /home/cxm/Downloads/Fedora-15-Beta-i686-Live-Desktop: binary operator expected
/home/cxm/Downloads/Fedora-15-Beta-i686-Live-Desktop (1).iso is not a file or block device.




Version-Release number of selected component (if applicable):
livecd-tools-14.2-1.fc14.i686


How reproducible:
100%

Steps to Reproduce:
1. Normal command line with escaped special characters, ie
livecd-iso-to-disk /home/cxm/Downloads/Fedora-15-Beta-i686-Live-Desktop\ \(1\).iso /dev/sdb1
  
Actual results:
Errors as above

Expected results:
Normal operation with filenames even if they are browser mangled

Additional info:
Browser was Chrome.

Comment 1 Steve Tyler 2011-04-08 21:41:04 UTC
(In reply to comment #0)
> Description of problem:
> After downloading an iso with the same name as a previous one, the browser
> often saves the file with a space and brackets in the new filename, eg.
...

I used do try to do this too.
My workaround is to create separate directories for each of the candidates, which eliminates naming conflicts.

$ ls -F fedora/F14/
F14-Alpha/  F14-Beta-RC1/  F14-Beta-RC2/  F14-Beta-RC3/  F14-Final-RC1/

Comment 2 cam 2011-04-08 22:55:57 UTC
(In reply to comment #1)
[...]
> My workaround is to create separate directories for each of the candidates,
> which eliminates naming conflicts.

Renaming the file also works around the problem, although we should probably fix the bug anyway. I didn't realise it was just a bash script, I will attach a patch that attempts to fix the problem.

Comment 3 cam 2011-04-08 22:58:10 UTC
Created attachment 490882 [details]
patch for livecd-iso-to-disk to quote $ISO in case it has unusual characters

I tried this with the filename that caused the bug and the disk was written correctly.

Comment 4 Bruno Wolff III 2011-04-09 01:02:47 UTC
Note that this patch doesn't apply against current upstream since most references to $ISO are now $SRC. I am not sure if that change is going to make it to F14 or not. If not I don't see a problem with doing two patches. F14 has enough life left, and the fix is simple enough, that I think its worth doing.

Comment 5 Bruno Wolff III 2011-04-09 01:11:10 UTC
Created attachment 490901 [details]
f15 branch version of the patch

I have made an f15 branch version of the patch. I didn't check, but likely this would work for the master branch as well.

Comment 6 Bruno Wolff III 2011-04-09 01:18:43 UTC
I looked at master now and the patch probably won't apply cleanly. So I'll look at making one for master as well.

Comment 7 Bruno Wolff III 2011-04-09 01:26:40 UTC
Created attachment 490903 [details]
Patch for master branch

There is now a patch for master as well. I didn't actually test either of my two patches yet. But I can do some testing and get these applied if I get some agreement for another developer that this is a good way to go.

Comment 8 Bruno Wolff III 2011-05-03 05:22:14 UTC
*** Bug 698070 has been marked as a duplicate of this bug. ***

Comment 9 Brian Lane 2011-08-11 21:52:09 UTC
*** Bug 715262 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.