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

Closes #17.
This commit is contained in:
Jonas Borgström 2014-01-03 14:47:02 +01:00
parent 57dfe372f6
commit 3a064aba56
4 changed files with 4 additions and 3 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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