ReaderUI:setLastDirForFileBrowser(): remove trailing /
Plugins may provide that dir with or without a trailing /. Not having a trailing / is expected by File browser to avoid duplicate paths.
This commit is contained in:
1 parent
886b3063e7
commit
9af693f84c
1 file changed
+3
@@ -429,6 +429,9 @@ function ReaderUI:init()
|
||||
end
|
||||
|
||||
function ReaderUI:setLastDirForFileBrowser(dir)
|
||||
if dir and #dir > 1 and dir:sub(-1) == "/" then
|
||||
dir = dir:sub(1, -2)
|
||||
end
|
||||
self.last_dir_for_file_browser = dir
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user