Changing to directories which contain strange file names doesn't work

Bug #381397 reported by Bernhard Seibold
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Medium
Johannes Sasongko

Bug Description

When navigating files and changing directories, it doesn't work when the directory contains strange file names. This exception is thrown:

Traceback (most recent call last):
  File "/usr/share/exaile/xl/panels/files.py", line 284, in row_activated
    self.load_directory(dir)
  File "/usr/share/exaile/xl/panels/files.py", line 312, in load_directory
    full = os.path.join(dir, path)
  File "/usr/lib/python2.6/posixpath.py", line 70, in join
    path += '/' + b
UnicodeDecodeError: 'utf8' codec can't decode byte 0x81 in position 20: unexpected code byte

Exaile should at least display the other files, or perhaps use codecs.register_error and display even the decodeable parts of the problematic filenames.

Related branches

Revision history for this message
reacocard (reacocard) wrote :

please test with a recent weekly of 0.3 from our downloads page and see if it has the same issue.

Changed in exaile:
status: New → Incomplete
Revision history for this message
Bernhard Seibold (blubb8128) wrote :

With Exaile 0.3.0a2 ubuntu package (exaile reports version 0.2.992), I can now change into the directory containing the invalidly named subdirectories. However I can't change into the invalid subdirs themselves.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Can you please attach a traceback of the failure in Exaile 0.3.0a2 (bzr branch lp:exaile to get the latest version), and attach a screenshot of your file hierarchy so we can see what it fails on ?

Thanks in advance.

Revision history for this message
Laurent (laurent-pouillet) wrote :

I have the same problem : I cannot explore directories in non-UTF8-encoding.

I'm not sure of the encoding of the directories : it has been written by a perl script, the name comes from a LATIN9 Postgresql database, and the script has been called with the following locales :
LANG=fr_FR@euro
LC_CTYPE="fr_FR@euro"
...="fr_FR@euro"
I hope this is sufficient for the encoding.

There is no traceback, even in --debug mode when I click on the directory name.

However, files in these directories, when dragged and dropped into exaile from another app can be correctly played.

A screenshot is attached below.

(OS : Debian testing, using exaile 0.3.0.1, and it worked with exaile 0.2.14, so this is a regression)

Laurent

Changed in exaile:
importance: Undecided → Medium
milestone: none → 0.3.0.3
status: Incomplete → Confirmed
Revision history for this message
Johannes Sasongko (sjohannes) wrote :

Taking this. For the record, 0.3.1 shouldn't be affected because it has better separation between the display name and the constructed path.

Changed in exaile:
assignee: nobody → Johannes Sasongko (sjohannes)
Revision history for this message
reacocard (reacocard) wrote :

Laurent, could you test whether the latest code from trunk fixes this? Trunk uses a completely different method of listing files which should handle different encodings better.

Revision history for this message
Laurent (laurent-pouillet) wrote :

Yes Aren, I confirm that the latest code corrects the problem.
Many thanks.
I hope this will be soon in Debian.

Laurent

reacocard (reacocard)
Changed in exaile:
assignee: Johannes Sasongko (sjohannes) → nobody
milestone: 0.3.0.3 → 0.3.1
status: Confirmed → Fix Committed
Revision history for this message
Johannes Sasongko (sjohannes) wrote :

Reopening for 0.3.0.3 after discussion with Aren.

Changed in exaile:
assignee: nobody → Johannes Sasongko (sjohannes)
milestone: 0.3.1 → 0.3.0.3
status: Fix Committed → Confirmed
Changed in exaile:
status: Confirmed → Fix Committed
reacocard (reacocard)
Changed in exaile:
milestone: 0.3.0.3 → 0.3.1
reacocard (reacocard)
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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