Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Skovhede <kenneth@hexad.dk>2020-12-19 17:02:09 +0300
committerGitHub <noreply@github.com>2020-12-19 17:02:09 +0300
commite070af3dd11f3b0371392cb8cd1784034a76740e (patch)
tree66dd54decb6b65ee50c5dd217e50dcbcc041ed89 /Duplicati/Library
parent1a476468f4a4d8d85b729b21a54d4fcece897140 (diff)
parenta39a24beaec889a7a3a2e786dfef614056c47259 (diff)
Merge pull request #4386 from warwickmm/catch_symlink_read_error
Catch and log exceptions encountered when getting symlink target
Diffstat (limited to 'Duplicati/Library')
-rw-r--r--Duplicati/Library/Main/Operation/Backup/MetadataPreProcess.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/Duplicati/Library/Main/Operation/Backup/MetadataPreProcess.cs b/Duplicati/Library/Main/Operation/Backup/MetadataPreProcess.cs
index bc72b7be7..a9e598d07 100644
--- a/Duplicati/Library/Main/Operation/Backup/MetadataPreProcess.cs
+++ b/Duplicati/Library/Main/Operation/Backup/MetadataPreProcess.cs
@@ -179,8 +179,17 @@ namespace Duplicati.Library.Main.Operation.Backup
// Not all reparse points are symlinks.
// For example, on Windows 10 Fall Creator's Update, the OneDrive folder (and all subfolders)
// are reparse points, which allows the folder to hook into the OneDrive service and download things on-demand.
- // If we can't find a symlink target for the current path, we won't treat it as a symlink.
- string symlinkTarget = snapshot.GetSymlinkTarget(path);
+ // If we can't find a symlink target for the current path, we won't treat it as a symlink.
+ string symlinkTarget = null;
+ try
+ {
+ symlinkTarget = snapshot.GetSymlinkTarget(path);
+ }
+ catch (Exception ex)
+ {
+ Logging.Log.WriteExplicitMessage(FILELOGTAG, "SymlinkTargetReadFailure", ex, "Failed to read symlink target for path: {0}", path);
+ }
+
if (!string.IsNullOrWhiteSpace(symlinkTarget))
{
if (options.SymlinkPolicy == Options.SymlinkStrategy.Ignore)