correct a comment, add more info to log message
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Fri, 17 Jun 2016 13:29:19 +0000 (15:29 +0200)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Fri, 17 Jun 2016 14:16:03 +0000 (16:16 +0200)
deltatar/deltatar.py

index 79a24ea..bad7ec9 100644 (file)
@@ -297,8 +297,7 @@ class DeltaTar(object):
                         break
 
                     # if the string ends with / it's a directory, and if the
-                    # path does not start with the directory, then it's not
-                    # included
+                    # path is contained in it, it is included
                     if i.endswith('/') and path.startswith(i):
                         match = MATCH
                         break
@@ -1297,7 +1296,8 @@ class DeltaTar(object):
                     self.logger.debug("restore %s" % ipath['path'])
                     helper.restore(ipath, l_no, restore_callback)
                 except Exception as e:
-                    self.logger.error("FAILED to restore: " + ipath.get('path', ''))
+                    self.logger.error("FAILED to restore: {} ({})"
+                                      .format(path.get('path', ''), e))
                 continue
 
             # if both files are equal, we have nothing to restore