Minor issue, won't affect many people, but puzzled my mind for a few hours anyway:
The stacktrace from freevo cache:


1550/2126 /opt/mp3/The Cure/Trilogy 2 Tempodrom Berlin 11-11-2002
Traceback (most recent call last):
File "/usr/local/freevo-1.5-pre1/src/helpers/cache.py", line 471, in ?
cache_directories(rebuild)
File "/usr/local/freevo-1.5-pre1/src/helpers/cache.py", line 179, in cache_directories
util.mediainfo.cache_recursive(all_dirs, verbose=True)
File "/usr/local/freevo-1.5-pre1/src/util/mediainfo.py", line 583, in cache_recursive
cache_dir(d)
File "/usr/local/freevo-1.5-pre1/src/util/mediainfo.py", line 550, in cache_dir
mmpython_cache.cache_dir(dirname, callback)
File "/usr/local/freevo-1.5-pre1/src/util/mediainfo.py", line 202, in cache_dir
info = self.create(fullname)
File "/usr/local/freevo-1.5-pre1/src/util/mediainfo.py", line 348, in create
name = util.getname(filename)
File "/usr/local/freevo-1.5-pre1/src/util/misc.py", line 199, in getname
name = name[0].upper() + name[1:]
IndexError: string index out of range




There were files called ".directory" and ".mp3" in it (invisible with ls without -a)
Hence "name" is an empty string and name[0] returns a string index out of range.


The fix is to add

   if len(name) < 2:
       return Unicode(name)

before the
   name = name[0].upper() + name[1:]

There is already a check if len(file) < 2, but file contains the complete path.

Zeratul




------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to