aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/reverse_longnames.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-10-05 22:22:28 +0200
committerJakob Unterwurzacher2016-10-05 22:22:28 +0200
commitff48dc1aab1c551dcaaa0f46b32dbc5f35e90e2e (patch)
tree7970a5c94bc8bf646fd899e785f647751ff8838e /internal/fusefrontend_reverse/reverse_longnames.go
parenta4956fa6bfde27c21f70e8577ebb586ccc9a3691 (diff)
reverse: initialize the longname cache only when reverse mode is used
Gets rid of the idling longnameCacheCleaner thread in "normal" mode.
Diffstat (limited to 'internal/fusefrontend_reverse/reverse_longnames.go')
-rw-r--r--internal/fusefrontend_reverse/reverse_longnames.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/fusefrontend_reverse/reverse_longnames.go b/internal/fusefrontend_reverse/reverse_longnames.go
index 5ad95b1..d59664d 100644
--- a/internal/fusefrontend_reverse/reverse_longnames.go
+++ b/internal/fusefrontend_reverse/reverse_longnames.go
@@ -30,7 +30,10 @@ func longnameCacheCleaner() {
}
}
-func init() {
+func initLongnameCache() {
+ if longnameParentCache != nil {
+ return
+ }
longnameParentCache = map[string]string{}
go longnameCacheCleaner()
}