mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -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