fix error when sending non-latin text to trash on linux

This commit is contained in:
Damien Elmes 2013-05-24 10:46:56 +09:00
parent 97a92e5ea9
commit 2be34598fe

View File

@ -51,6 +51,8 @@ def info_for(src, topdir):
src = op.relpath(src, topdir)
info = u"[Trash Info]\n"
if isinstance(src, unicode):
src = src.encode("utf8")
info += u"Path=" + quote(src) + u"\n"
info += u"DeletionDate=" + format_date(datetime.now()) + u"\n"
return info