From d6e189df5e8489479ebed8dde469574f78181f15 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 27 Dec 2020 16:53:40 -0800 Subject: [PATCH] Update commentary --- server/filesystem/archive.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/filesystem/archive.go b/server/filesystem/archive.go index 6850e39..f4227de 100644 --- a/server/filesystem/archive.go +++ b/server/filesystem/archive.go @@ -143,8 +143,9 @@ func (a *Archive) withFilesCallback(tw *tar.Writer) func(path string, de *godirw // Adds a given file path to the final archive being created. func (a *Archive) addToArchive(p string, rp string, w *tar.Writer) error { - // Lstat the file, this will give us the same information as Stat except - // that it will not follow a symlink to it's target automatically. + // Lstat the file, this will give us the same information as Stat except that it will not + // follow a symlink to it's target automatically. This is important to avoid including + // files that exist outside the server root unintentionally in the backup. s, err := os.Lstat(p) if err != nil { if os.IsNotExist(err) {