"Edit timelog.txt" fails on Windows if space present in path
Bug #328118 reported by
Rodrigo Daunoravicius
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GTimeLog |
Fix Released
|
High
|
Unassigned |
Bug Description
The ~/.gtimelog path in Windows XP expands to something like "C:\Documents and Settings\
My current solution on my Windows machine is to add double-quotes around the path string in the MainWindow.
This will still work in my Ubuntu and Debian machines, but I'm not sure if it won't break elsewhere. I'm submitting the patch anyway.
The most cross-platform-safe solution would be to rewrite MainWindow.spawn() to use subprocess.call() instead of os.system(), but this would imply parsing the command strings supplied by the user in gtimelogrc.
Changed in gtimelog: | |
importance: | Undecided → High |
tags: | added: patch |
Changed in gtimelog: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Currently I just committed your patch unmodified, but I'd like to fix it properly.
The shlex module from the standard library could be useful for parsing the user-supplied string.