mirror of
https://github.com/arsenetar/send2trash.git
synced 2026-03-26 15:51:38 +00:00
Added support for Gnome's gio
Instead of using our own Freedesktop's trash implementation, use gio when it's available.
This commit is contained in:
@@ -11,4 +11,9 @@ if sys.platform == 'darwin':
|
||||
elif sys.platform == 'win32':
|
||||
from .plat_win import send2trash
|
||||
else:
|
||||
from .plat_other import send2trash
|
||||
try:
|
||||
# If we can use gio, let's use it
|
||||
from .plat_gio import send2trash
|
||||
except ImportError:
|
||||
# Oh well, let's fallback to our own Freedesktop trash implementation
|
||||
from .plat_other import send2trash
|
||||
|
||||
Reference in New Issue
Block a user