If selected file is a directory, paste inside it

This commit is contained in:
Paulo Matias
2014-01-22 16:08:24 -02:00
parent e9421d0aa5
commit 6c68041824

View File

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