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.
reviewable/pr6248/r1
poire-z 4 years ago
parent 886b3063e7
commit 9af693f84c

@ -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

Loading…
Cancel
Save