Merge pull request #524 from anderbubble/symlink-wwbackup

Fix a typo in symlink wwbackup implementation
This commit is contained in:
Christian Goll
2022-09-05 09:31:44 +02:00
committed by GitHub

View File

@@ -300,7 +300,7 @@ func BuildOverlayIndir(nodeInfo node.NodeInfo, overlayNames []string, outputDir
if util.IsFile(path.Join(outputDir, location)) {
if !util.IsFile(path.Join(outputDir, location+".wwbackup")) {
wwlog.Debug("Target exists, creating backup file")
err = os.Rename(path.Join(outputDir, location), path.Join(outputDir, location+"wwbackup"))
err = os.Rename(path.Join(outputDir, location), path.Join(outputDir, location+".wwbackup"))
} else {
wwlog.Debug("%s exists, keeping the backup file", path.Join(outputDir, location+".wwbackup"))
err = os.Remove(path.Join(outputDir, location))