1
0
mirror of https://github.com/arsenetar/send2trash.git synced 2024-12-21 10:59:03 +00:00

URL Escape the Path in trashinfo

This commit is contained in:
gbn 2011-03-10 14:56:19 -05:00
parent 18e3187c2f
commit eedbe258cb

View File

@ -20,6 +20,7 @@ import os.path as op
import logging
from datetime import datetime
import stat
from urllib.parse import quote
FILES_DIR = 'files'
INFO_DIR = 'info'
@ -54,7 +55,7 @@ def info_for(src, topdir):
src = op.relpath(src, topdir)
info = "[Trash Info]\n"
info += "Path=" + src + "\n"
info += "Path=" + quote(src) + "\n"
info += "DeletionDate=" + format_date(datetime.now()) + "\n"
return info