mirror of
https://github.com/datarhei/core.git
synced 2025-12-24 13:07:56 +08:00
Unlock before purging
This commit is contained in:
@@ -133,7 +133,6 @@ func (rfs *filesystem) UpdateCleanup(id string, newPatterns []Pattern, purge boo
|
||||
newPatterns = rfs.compilePatterns(newPatterns)
|
||||
|
||||
rfs.cleanupLock.Lock()
|
||||
defer rfs.cleanupLock.Unlock()
|
||||
|
||||
currentPatterns := rfs.cleanupPatterns[id]
|
||||
delete(rfs.cleanupPatterns, id)
|
||||
@@ -176,6 +175,8 @@ func (rfs *filesystem) UpdateCleanup(id string, newPatterns []Pattern, purge boo
|
||||
}).Log("Remove pattern")
|
||||
}
|
||||
|
||||
rfs.cleanupLock.Unlock()
|
||||
|
||||
if purge {
|
||||
rfs.purge(onlyCurrent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user