<%
local filename = _POST["filename"] or _GET["filename"] or nil

if _SESSION["username"] ~= nil and _SESSION["currentpath"] ~= nil and filename ~= nil then
	local filename_s = string.gsub(filename,"%[",":{{")
	filename_s = string.gsub(filename_s,"%]","}}:")
	rawset(_SESSION,"copy_filename",filename_s)
	rawset(_SESSION,"copy_dirname",_SESSION["currentpath"])
	rawset(_SESSION,"cut_filename",nil)
	rawset(_SESSION,"cut_dirname",nil)
	SessionModule.save(_SESSION_ID)
end

%>