diff --git a/Duplicati/Library/Snapshots/LinuxSnapshot.cs b/Duplicati/Library/Snapshots/LinuxSnapshot.cs index 95e742cd8..26f853a0c 100644 --- a/Duplicati/Library/Snapshots/LinuxSnapshot.cs +++ b/Duplicati/Library/Snapshots/LinuxSnapshot.cs @@ -487,18 +487,28 @@ namespace Duplicati.Library.Snapshots /// The file or folder to examine public override bool IsBlockDevice(string localPath) { - var n = UnixSupport.File.GetFileType(SystemIOLinux.NormalizePath(localPath)); - switch (n) + try { - case UnixSupport.File.FileType.Directory: - case UnixSupport.File.FileType.Symlink: - case UnixSupport.File.FileType.File: + var n = UnixSupport.File.GetFileType(SystemIOLinux.NormalizePath(localPath)); + switch (n) + { + case UnixSupport.File.FileType.Directory: + case UnixSupport.File.FileType.Symlink: + case UnixSupport.File.FileType.File: + return false; + default: + return true; + } + } + catch + { + if (!System.IO.File.Exists(SystemIOLinux.NormalizePath(localPath))) return false; - default: - return true; + + throw; } } - + /// /// Gets a unique hardlink target ID ///