Fix a bug in the file size calculation
git-svn-id: svn://svn.berlios.de/gpodder/trunk@553 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
parent
748f5496ec
commit
eaea0425e5
|
@ -1,3 +1,12 @@
|
|||
Wed, 30 Jan 2008 09:23:19 +0100 <thp@perli.net>
|
||||
Fix a bug in the file size calculation
|
||||
|
||||
* src/gpodder/util.py: calculate_filesize should deal with "None"
|
||||
passed as filename (now returns zero-size);
|
||||
Fixes: Bug #23 (http://gpodder.thegithouse.com/show_bug.cgi?id=23)
|
||||
Thanks to FriedBunny <friedbunny@kulturny.com> for reporting this
|
||||
issue in our bug tracker
|
||||
|
||||
Mon, 28 Jan 2008 12:33:13 +0100 <thp@perli.net>
|
||||
Merge new sync code from thp's private branch
|
||||
|
||||
|
|
|
@ -142,6 +142,9 @@ def calculate_size( path):
|
|||
correct if the user doesn't have appropriate permissions
|
||||
to list all subdirectories of the given path.
|
||||
"""
|
||||
if path is None:
|
||||
return 0L
|
||||
|
||||
if os.path.dirname( path) == '/':
|
||||
return 0L
|
||||
|
||||
|
|
Loading…
Reference in New Issue