Package: bittornado / 0.3.18-10.3

28_float_mod_time_fix.dpatch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/sh /usr/share/dpatch/dpatch-run
## 28_float_mod_time_fix.dpatch by Cameron Dale <camrdale@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: fix for OSes that return file modification time as a float
## DP: Taken from upstream's CVS.

@DPATCH@
--- bittornado.orig/BitTornado/parsedir.py
+++ bittornado/BitTornado/parsedir.py
@@ -37,7 +37,8 @@
             if newtorrent:
                 newtorrents = True
                 p = os.path.join(directory, f)
-                new_files[p] = [(os.path.getmtime(p), os.path.getsize(p)), 0]
+                new_files[p] = [(int(os.path.getmtime(p)),
+                                 os.path.getsize(p)), 0]
                 torrent_type[p] = newtorrent
         if not newtorrents:
             for f in os.listdir(directory):