Allow chunks subdirectories in the disk storage to be symlinks.

This commit is contained in:
Gilbert Chen
2020-09-29 13:15:45 -04:00
parent 836a785798
commit 7e372edd68

View File

@@ -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)
}
}
}