Hello!
Instead of displaying the proper percentage of the copied file in the
FS-based sync dialog, gPodder would initially report 100% and near the end of
the copy it would report percentages > 100%. The attached patch fixes this
behaviour.
nick
--- gpodder-r612/src/gpodder/sync.py 2008-03-18 17:24:30.000000000 -0400
+++ gpodder-r612-dev/src/gpodder/sync.py 2008-03-18 17:27:47.000000000 -0400
@@ -488,7 +488,6 @@
s = in_file.read(self.buffer_size)
bytes_read += len(s)
while s:
- bytes_read += len(s)
try:
out_file.write(s)
except IOError, ioerror:
@@ -505,8 +504,9 @@
log('Error while trying to unlink %s. OH MY!' % to_file, sender=self)
self.cancel()
return False
- self.notify('sub-progress', int(max(100, 100*float(bytes_read)/float(bytes))))
+ self.notify('sub-progress', int(min(100, 100*float(bytes_read)/float(bytes))))
s = in_file.read(self.buffer_size)
+ bytes_read += len(s)
out_file.close()
in_file.close()
_______________________________________________
gpodder-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-devel