Update commentary

This commit is contained in:
Dane Everitt 2020-12-27 16:53:40 -08:00
parent 68749616ad
commit d6e189df5e
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

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