Remove empty sidecar folder

This commit is contained in:
Zijie He authored and Frans de Jonge committed 2017-02-09 17:48:06 +01:00
1 parent 6b5b426639
commit faaca028e7
1 file changed
+4
@@ -165,6 +165,10 @@ function FileManager:init()
callback = function()
local full_path = util.realpath(file)
os.remove(DocSettings:getSidecarFile(full_path))
-- If the sidecar folder is empty, os.remove() can
-- delete it. Otherwise, the following statement has no
-- effect.
os.remove(DocSettings:getSidecarDir(full_path))
self:refreshPath()
-- also remove from history if present
local readhistory = require("readhistory")