Cannot execute contracts for files with spaces in filename

Bug #1123040 reported by Sergey "Shnatsel" Davidoff
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Contractor
Fix Released
Undecided
Unassigned
0.2
New
Undecided
Unassigned
0.3
Fix Released
Undecided
Unassigned

Bug Description

Files cannot execute contracts for files with spaces in filename, at least if files are passed as files, not URLs. Spaces are treated as argument separators and the provider receives fragments of the filename in multiple parameters.

ProblemType: Bug
DistroRelease: elementary OS 0.2
Package: pantheon-files 0.1-0~r1099+pkg10~custombuild
ProcVersionSignature: Ubuntu 3.5.0-19.30~precise1-generic 3.5.7
Uname: Linux 3.5.0-19-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.1+elementary3~precise1
Architecture: amd64
CrashDB: pantheon_files
Date: Tue Feb 12 16:57:00 2013
ExecutablePath: /usr/bin/pantheon-files
GsettingsChanges:

InstallationMedia: elementary OS 0.2 "Luna" - Build amd64 LIVE Binary 20121001-15:16
MarkForUpload: True
ProcEnviron:
 PATH=(custom, no user)
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
SourcePackage: pantheon-files
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

This happens because Contractor returns an exec *string* that Files then executes with spawn_command_line_async () which is a design flaw. We can either make Contractor quote individual filenames [UGLY], or implement proper spawning with spawn_async () in Contractor itself, as suggested in https://blueprints.launchpad.net/contractor/+spec/fix-architecture-flaws specification.

Cody Garver (codygarver)
Changed in pantheon-files:
status: New → Incomplete
no longer affects: pantheon-files
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.