summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/files.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/script/files.lua b/script/files.lua
index 0cbfe2ce..b01f02e6 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -419,8 +419,8 @@ function m.addRef(uri)
if not file then
return nil
end
- file._ref = (file._ref or 0) + 1
- log.debug('add ref', uri, file._ref)
+ file.ref = (file.ref or 0) + 1
+ log.debug('add ref', uri, file.ref)
return function ()
m.delRef(uri)
end
@@ -431,9 +431,9 @@ function m.delRef(uri)
if not file then
return
end
- file._ref = (file._ref or 0) - 1
- log.debug('del ref', uri, file._ref)
- if file._ref <= 0 and not m.isOpen(uri) then
+ file.ref = (file.ref or 0) - 1
+ log.debug('del ref', uri, file.ref)
+ if file.ref <= 0 and not m.isOpen(uri) then
m.remove(uri)
end
end