mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Use os.remove() instead of os.execute("rm...") because it is less expensive
as it uses remove(3) C library function rather than fork/exec-ing a new process.
This commit is contained in:
@@ -217,7 +217,7 @@ function FileHistory:addAllCommands()
|
||||
function(self)
|
||||
file_entry = self.result[self.perpage*(self.page-1)+self.current]
|
||||
local file_to_del = file_entry.dir .. "/" .. file_entry.name
|
||||
os.execute("rm \""..DocToHistory(file_to_del).."\"")
|
||||
os.remove(DocToHistory(file_to_del))
|
||||
-- to avoid showing just deleted file
|
||||
self:init()
|
||||
self:setSearchResult(self.keywords)
|
||||
|
||||
Reference in New Issue
Block a user