Language Selector crashes when drag languages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
language-selector (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: language-selector
I have a Ubuntu 10.10 (Upgrade from Lucid) and everything is up-to-date.
The default language is English, after installing the Chinese (whatever simplified or traditional), I dragged the Language to the front, then a crash report displayed.
I tried to run Language Selector under terminal, here the output:
Traceback (most recent call last):
File "/usr/lib/
res = f(*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
find_
File "/usr/lib/
os.
OSError: [Errno 18] Invalid cross-device link
After reading the source code, I've known the bug is caused by moving file from /tmp to $HOME through Python's os module.
I've fixed the bug in my bzr branch, Please help to merge my work.
Thanks!
Related branches
- Colin Watson: Approve
-
Diff: 18 lines (+2/-1)1 file modifiedLanguageSelector/utils.py (+2/-1)
Scott Kitterman pointed out that this isn't the right fix; as the comment above the os.rename points out, we rely on rename being atomic (otherwise a crash could result in a broken /etc/default/ locale) , and shutil.move isn't. What we should do instead, I think, is create the temporary file in the same directory as the original to make sure that it's on the same filesystem. I'm working on this.