mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
If selected file is a directory, paste inside it
This commit is contained in:
@@ -172,8 +172,10 @@ end
|
||||
|
||||
function FileManager:pasteHere(file)
|
||||
if self.clipboard then
|
||||
file = util.realpath(file)
|
||||
local orig = util.realpath(self.clipboard)
|
||||
local dest = util.realpath(file):match("(.*/)")
|
||||
local dest = lfs.attributes(file, "mode") == "directory" and
|
||||
file or file:match("(.*/)")
|
||||
if self.cutfile then
|
||||
util.execute("/bin/mv", orig, dest)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user