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

This commit is contained in:
Felix Pojtinger
2021-12-17 15:57:20 +01:00
parent b58cf7d02f
commit 71e69d6057

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]
}