plat_other tries to see if an Ubuntu-style trash exists and uses it.

This commit is contained in:
Virgil Dupras 2010-04-06 19:11:37 +02:00
parent 6856e49f2d
commit cc15b628a2
1 changed files with 14 additions and 1 deletions

View File

@ -2,8 +2,21 @@ from __future__ import unicode_literals
import sys
import os
import os.path as op
import logging
TRASH_PATH = op.expanduser('~/.Trash')
for candidate in CANDIDATES:
candidate_path = op.expanduser(candidate)
if op.exists(candidate_path):
TRASH_PATH = candidate_path
logging.warning("Can't find path for Trash")
TRASH_PATH = op.expanduser('~/.Trash')
# XXX Make this work on external volumes