From 2be34598fe65b6f9f17718c5a877128ebc889ed6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 24 May 2013 10:46:56 +0900 Subject: [PATCH] fix error when sending non-latin text to trash on linux --- thirdparty/send2trash/plat_other.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/thirdparty/send2trash/plat_other.py b/thirdparty/send2trash/plat_other.py index 292be0960..abd348efd 100644 --- a/thirdparty/send2trash/plat_other.py +++ b/thirdparty/send2trash/plat_other.py @@ -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