|
@@ -52,7 +52,11 @@ func createBasePath() {
|
|
}
|
|
}
|
|
|
|
|
|
func removeUnusedPaths() {
|
|
func removeUnusedPaths() {
|
|
- for range time.Tick(gpmCleanupPeriod) {
|
|
|
|
|
|
+ gpmLock.Lock()
|
|
|
|
+ period := gpmCleanupPeriod
|
|
|
|
+ gpmLock.Unlock()
|
|
|
|
+
|
|
|
|
+ for range time.Tick(period) {
|
|
gpmLock.Lock()
|
|
gpmLock.Lock()
|
|
pathList := make([]string, 0, len(garbagePathMap))
|
|
pathList := make([]string, 0, len(garbagePathMap))
|
|
for path := range garbagePathMap {
|
|
for path := range garbagePathMap {
|