]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/drecurse.py
Modify drecurse.py and index.py to use xstat functions.
[bup.git] / lib / bup / drecurse.py
index ac0115e9f1685c965fad86bf883e44a045a72383..129679a2219c5e84f8f1833af6b7ef44a81c05f4 100644 (file)
@@ -1,5 +1,6 @@
 import stat
 from bup.helpers import *
+import bup.xstat as xstat
 
 try:
     O_LARGEFILE = os.O_LARGEFILE
@@ -26,7 +27,7 @@ class OsFile:
         os.fchdir(self.fd)
 
     def stat(self):
-        return os.fstat(self.fd)
+        return xstat.fstat(self.fd)
 
 
 _IFMT = stat.S_IFMT(0xffffffff)  # avoid function call in inner loop
@@ -34,7 +35,7 @@ def _dirlist():
     l = []
     for n in os.listdir('.'):
         try:
-            st = os.lstat(n)
+            st = xstat.lstat(n)
         except OSError, e:
             add_error(Exception('%s: %s' % (realpath(n), str(e))))
             continue
@@ -68,7 +69,7 @@ def recursive_dirlist(paths, xdev):
         assert(type(paths) != type(''))
         for path in paths:
             try:
-                pst = os.lstat(path)
+                pst = xstat.lstat(path)
                 if stat.S_ISLNK(pst.st_mode):
                     yield (path, pst)
                     continue