empty directory entry in folder view

Bug #242675 reported by ThijsVermeir
4
Affects Status Importance Assigned to Milestone
Moovida
Fix Released
Medium
Philippe Normand

Bug Description

with the latest upicek branch I see an empty directory entry in the folder view for audio, video and music.

This bug is on Linux systems only:
1. Delete A Default Media Directory (In English: ~/Movies, ~/Music, etc)
2. Install Elisa on Ubuntu to test it.
3. Start Elisa with a blank configuration
4. Browser to <Media View> -> folders
5. You should only see the "Add directories" menu entry.

Revision history for this message
ThijsVermeir (thijsvermeir) wrote :
Revision history for this message
Florian Boucault (fboucault) wrote :

This is due to a screw up of the XDG directories. XDG returns the home directory in certain corner cases such as you removing on the command line your XDG media directories.

A robust solution is to disregard the home directory if it's returned from MediaDirectoryHelper.get_directories called at poblesec/directory_settings.py line 72.

Changed in elisa:
importance: Undecided → Medium
milestone: none → 0.5.1
status: New → Confirmed
Changed in elisa:
milestone: 0.5.1 → 0.5.1-win32-alpha3
Revision history for this message
Philippe Normand (philn) wrote :

I can't reproduce that bug.. Can you, Thjis?

Changed in elisa:
milestone: 0.5.1-win32-alpha3 → 0.5.1
Revision history for this message
ThijsVermeir (thijsvermeir) wrote :

Yes, I still can reproduce it.

The problem is like Kaleo says that the home directory is returned in my case '/home/thijs/' (with the slash in the back) and MediaUri.filename__get returns the stuff after the last slash so in this case nothing... This patch removes the trailing slash from the directories and fixes the problem for me.

=== modified file 'elisa-plugins/elisa/plugins/poblesec/directory_settings.py'
--- elisa-plugins/elisa/plugins/poblesec/directory_settings.py 2008-06-27 11:57:53 +0000
+++ elisa-plugins/elisa/plugins/poblesec/directory_settings.py 2008-06-27 22:21:50 +0000
@@ -272,6 +272,8 @@

         for dir in dirs:
             link = Link()
+ if dir[len(dir)-1]=='/':
+ dir = dir[:-1]
             uri = MediaUri("file://%s" % dir)
             link.controller_path = "/poblesec/%s/filesystem" % media_type

Revision history for this message
Philippe Normand (philn) wrote :

Ok, managed to reproduce it.. A fix will be available soon in upicek. Thanks for the hint!

Changed in elisa:
assignee: nobody → philn
status: Confirmed → In Progress
Olivier Tilloy (osomon)
Changed in elisa:
status: In Progress → Fix Committed
milestone: 0.5.1 → 0.5.1-win32-daily-040708
Joshua Eichen (jeichen)
description: updated
Changed in elisa:
status: Fix Committed → Fix Released
Guido Amoruso (guidonte)
Changed in elisa:
status: Fix Released → Confirmed
Changed in elisa:
status: Confirmed → 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.