From 7c8783e7c2c785294589198231fa9e923733bce9 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 2 Jul 2016 18:47:22 +0200 Subject: [PATCH] Revert "in --read-special mode, follow symlinks, fixes #1215" This reverts commit c3073bacbb4850cf3a526ac08db42b05f3e33684. Needs to be solved differently, see following changesets. --- borg/archiver.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/borg/archiver.py b/borg/archiver.py index c8d4b1355..9996ede5e 100644 --- a/borg/archiver.py +++ b/borg/archiver.py @@ -256,15 +256,7 @@ class Archiver: return try: - # usually, do not follow symlinks (if we have a symlink, we want to - # backup it as such). - # but if we are in --read-special mode, we later process as - # a regular file (we open and read the symlink target file's content). - # thus, in read_special mode, we also want to stat the symlink target - # file, for consistency. if we did not, we also have issues extracting - # this file, as it would be in the archive as a symlink, not as the - # target's file type (which could be e.g. a block device). - st = os.stat(path, follow_symlinks=read_special) + st = os.lstat(path) except OSError as e: self.print_warning('%s: %s', path, e) return