2
0
Эх сурвалжийг харах

Fix sorting of segment names to ignore NFS left over files.

Closes #17.
Jonas Borgström 11 жил өмнө
parent
commit
3a064aba56
4 өөрчлөгдсөн 4 нэмэгдсэн , 3 устгасан
  1. 1 0
      CHANGES
  2. 1 1
      LICENSE
  3. 1 1
      attic/repository.py
  4. 1 1
      docs/conf.py

+ 1 - 0
CHANGES

@@ -8,6 +8,7 @@ Version 0.9
 
 (feature release, released on X)
 
+- Fix sorting of segment names to ignore NFS left over files. (#17)
 - Fix incorrect display of time (#13)
 - Improved error handling / reporting. (#12)
 - Use fcntl() instead of flock() when locking repository/cache. (#15)

+ 1 - 1
LICENSE

@@ -1,4 +1,4 @@
-Copyright (C) 2010-2013 Jonas Borgström <jonas@borgstrom.se>
+Copyright (C) 2010-2014 Jonas Borgström <jonas@borgstrom.se>
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without

+ 1 - 1
attic/repository.py

@@ -296,7 +296,7 @@ class LoggedIO(object):
     def _segment_names(self, reverse=False):
         for dirpath, dirs, filenames in os.walk(os.path.join(self.path, 'data')):
             dirs.sort(key=int, reverse=reverse)
-            filenames.sort(key=int, reverse=reverse)
+            filenames = sorted((filename for filename in filenames if filename.isdigit()), key=int, reverse=reverse)
             for filename in filenames:
                 yield int(filename), os.path.join(dirpath, filename)
 

+ 1 - 1
docs/conf.py

@@ -41,7 +41,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = 'Attic - Deduplicating Archiver'
-copyright = '2010-2013, Jonas Borgström'
+copyright = '2010-2014, Jonas Borgström'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the