Scanning collection in not allowed directory(permission drw------) is not handled, cause an exception

Bug #426396 reported by stack
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Medium
reacocard

Bug Description

I have a directory that my user is not allowed to execute, when exaile try to scan it I get this exception and the scanning progress remains at 0%:

INFO : Scanning library: file:///home/stack/Musica (xl.collection)
Exception in thread Thread-7:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/exaile/xl/collection.py", line 230, in __count_files
    file_count += library._count_files()
  File "/usr/local/lib/exaile/xl/collection.py", line 401, in _count_files
    for file in self._walk(gio.File(self.location)):
  File "/usr/local/lib/exaile/xl/collection.py", line 474, in _walk
    for fileinfo in dir.enumerate_children("standard::type,"
Error: Error stating file '/home/stack/Musica/Reggae/Steel Pulse - Discography (1978-2004)/1978 - Handsworth Revolution': Permission denied

Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/exaile/xlgui/collection.py", line 79, in run
    self.collection.rescan_libraries()
  File "/usr/local/lib/exaile/xl/collection.py", line 204, in rescan_libraries
    library.rescan(notify_interval=scan_interval)
  File "/usr/local/lib/exaile/xl/collection.py", line 548, in rescan
    for fil in self._walk(libloc):
  File "/usr/local/lib/exaile/xl/collection.py", line 474, in _walk
    for fileinfo in dir.enumerate_children("standard::type,"
Error: Error stating file '/home/stack/Musica/Reggae/Steel Pulse - Discography (1978-2004)/1978 - Handsworth Revolution': Permission denied

Revision history for this message
David Wagner (daw-bugzilla) wrote :

I also get a similar error, in the latest bzr head (r2502). Here's the error message I get, when trying to re-scan my collection:

INFO : Scanning library: file:///home/daw/more/music/taverner
Exception in thread Thread-8:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/threading.py", line 522, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.6/threading.py", line 477, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/exaile/xl/collection.py", line 230, in __count_files
    file_count += library._count_files()
  File "/usr/local/lib/exaile/xl/collection.py", line 401, in _count_files
    for file in self._walk(gio.File(self.location)):
  File "/usr/local/lib/exaile/xl/collection.py", line 474, in _walk
    for fileinfo in dir.enumerate_children("standard::type,"
Error: Permission denied

Note: in this case, it doesn't show any filename.

I know that I have a directory whose permissions are 000 (not readable, writeable, or executable). It's possible that this directory could be triggering the above error message.

This is on Fedora 11 x86-64 Linux.

Revision history for this message
reacocard (reacocard) wrote :

We currently don't have any particular handling for inaccessible files and directories, we need to fix this so we skip over them without erroring.

Changed in exaile:
assignee: nobody → Aren Olson (reacocard)
importance: Undecided → Medium
milestone: none → 0.3.1
status: New → Confirmed
Revision history for this message
reacocard (reacocard) wrote :

fixed trunk/2713

Changed in exaile:
status: Confirmed → Fix Committed
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

Remote bug watches

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