diff options
author | Chris Wilson <chris+github@qwirx.com> | 2011-01-09 11:59:10 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2011-01-09 11:59:10 +0000 |
commit | 2d9925d267da5f4b988060c2d3b156d8408b0611 (patch) | |
tree | b3d27b38ad9bb3dd5a8e30e66943c5f06202acfc /bin/bbackupd/BackupClientDirectoryRecord.cpp | |
parent | 95fd7ffcdedcaa22ec98f837752a8b08462fea02 (diff) |
Workaround for apparent btrfs bug, where symlinks appear to be on a
different filesystem than their containing directory, by only checking
for a different filesystem when checking directories, because files and
special files can't be mount points anyway. Thanks to Toke
Hoiland-Jorgensen.
Diffstat (limited to 'bin/bbackupd/BackupClientDirectoryRecord.cpp')
-rw-r--r-- | bin/bbackupd/BackupClientDirectoryRecord.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.cpp b/bin/bbackupd/BackupClientDirectoryRecord.cpp index f1d5fa00..f870365c 100644 --- a/bin/bbackupd/BackupClientDirectoryRecord.cpp +++ b/bin/bbackupd/BackupClientDirectoryRecord.cpp @@ -325,7 +325,14 @@ void BackupClientDirectoryRecord::SyncDirectory( file_st.st_dev << "/" << file_st.st_ino); - if(file_st.st_dev != dest_st.st_dev) + int type = file_st.st_mode & S_IFMT; + + /* Workaround for apparent btrfs bug, where + symlinks appear to be on a different filesystem + than their containing directory, thanks to + Toke Hoiland-Jorgensen */ + if(type == S_IFDIR && + file_st.st_dev != dest_st.st_dev) { if(!(rParams.mrContext.ExcludeDir( filename))) @@ -335,8 +342,6 @@ void BackupClientDirectoryRecord::SyncDirectory( } continue; } - - int type = file_st.st_mode & S_IFMT; #endif if(type == S_IFREG || type == S_IFLNK) |