From 7e372edd68d59785f0d2bffe66c198717bcbc50e Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Tue, 29 Sep 2020 13:15:45 -0400 Subject: [PATCH] Allow chunks subdirectories in the disk storage to be symlinks. --- src/duplicacy_filestorage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duplicacy_filestorage.go b/src/duplicacy_filestorage.go index 604cffa..28f753c 100644 --- a/src/duplicacy_filestorage.go +++ b/src/duplicacy_filestorage.go @@ -165,8 +165,8 @@ func (storage *FileStorage) UploadFile(threadIndex int, filePath string, content return err } } else { - if !stat.IsDir() { - return fmt.Errorf("The path %s is not a directory", dir) + if !stat.IsDir() && stat.Mode() & os.ModeSymlink == 0 { + return fmt.Errorf("The path %s is not a directory or symlink", dir) } } }