fix: Prevent false positives for no-op detection in index

This commit is contained in:
Felicitas Pojtinger
2021-12-17 15:57:20 +01:00
parent 3948da5cfd
commit 59d65169ff

View File

@@ -298,7 +298,7 @@ func indexHeader(
case records.STFSRecordActionUpdate:
moveAfterEdits := false
oldName := hdr.Name
if _, ok := hdr.PAXRecords[records.STFSRecordReplacesName]; ok && oldName != hdr.Name {
if _, ok := hdr.PAXRecords[records.STFSRecordReplacesName]; ok {
moveAfterEdits = true
oldName = hdr.PAXRecords[records.STFSRecordReplacesName]
}