Commit Graph

29 Commits (f6897609ba57222e14350542ed2a7216715dfd44)

Author SHA1 Message Date
Andrew Senetar 5733670fc2 Workaround embedded null character (#18)
Workaround embedded null characters in strings.  This fixes 17.
6 years ago
Virgil Dupras 3071684f73 Fix newly-introduced crash under Windows
ref #14
6 years ago
Virgil Dupras 016b90c1ac Update copyright 6 years ago
Virgil Dupras f324ff491e Properly reuse the "compat" unit 6 years ago
Thomas Kluyver 7fece243d8 Use bytes throughout plat_other 6 years ago
Kfir Hadas f6f63b1796 Use text_type (unicode for PY2, str for PY3) (#12) 6 years ago
Julian David Rath 6c01453fd3 throwing a WindowsError with the code 8 years ago
Elan Ruusamäe 72bc94b48d Update plat_other.py
minor typo fix
8 years ago
Virgil Dupras baf125ff61 Added support for Gnome's gio
Instead of using our own Freedesktop's trash implementation,
use gio when it's available.
11 years ago
Virgil Dupras bb8ed834da Add same-codebase support for python 2.7.
When I opted for two codebases for python2/python3,
Send2Trash used C modules and it was easier to just have two
packages. With the ctypes version, supporting both python
versions becomes trivial and it's much more convenient to
merge them back into a single codebase.

I've only tested this code on Linux. I've converted plat_osx and
plat_win, but they only work theoretically.
11 years ago
gbn aee2b7a8af Check access and devices before attempting trash. 13 years ago
gbn d090156c45 Use realpath to find mountpoint 13 years ago
Virgil Dupras 358b705cbc Made a few minor style fixes, and added a proper error in cases where the target path of send2trash() doesn't exist. 13 years ago
gbn eedbe258cb URL Escape the Path in trashinfo 13 years ago
gbn 18e3187c2f Replace == None with is None 13 years ago
gbn 8001be8f37 Remove import * 13 years ago
gbn 13b3943c82 Replace plat_other with one supporting the XDG Trash spec
Added tests for plat_other
13 years ago
Virgil Dupras 899a3efeb3 Converted the compiled win module to ctypes.
--HG--
branch : py3k
13 years ago
Virgil Dupras a6907d57a9 Converted the compiled osx module to ctypes.
--HG--
branch : py3k
13 years ago
Virgil Dupras 02dc392c45 Fixed a bug in plat_other where conflict handling wouldn't be done correctly in external volume. Thanks to John Benediktsson for the tip.
--HG--
branch : py3k
extra : transplant_source : %C6%11%009sx%B29%CF%EC%CC%D4%88r%BE%D8%BB%9AIa
14 years ago
Virgil Dupras 7546aa606a Fixed an infinite loop in plat_other when using a relative path in a mounted directory.
--HG--
branch : py3k
extra : transplant_source : %B4%A2%DB%EFn%BB%3A%F6%AE%06%F3%29%DB%06%FBE%D0%A2%BEt
14 years ago
Virgil Dupras 2858b5b153 Converted to py3k (haven't tried it on Windows yet, but it should compile and work...)
--HG--
branch : py3k
14 years ago
Virgil Dupras f5f9c5b352 Fixed the copyright comment which was at a strange place. 14 years ago
Virgil Dupras 203973d66c Licensed under BSD. 14 years ago
Virgil Dupras ae126c47bf In plat_other, added support for sending to trash on external volumes. 14 years ago
Virgil Dupras cc15b628a2 plat_other tries to see if an Ubuntu-style trash exists and uses it. 14 years ago
Virgil Dupras 6856e49f2d Added the plat_other module (for Linux). 14 years ago
Virgil Dupras 8a1dff2947 Renamed _trash_* modules to _send2trash_* and added python wrapper around them.
--HG--
rename : modules/trash_osx.c => modules/send2trash_osx.c
rename : modules/trash_win.c => modules/send2trash_win.c
14 years ago
Virgil Dupras 5aa4811725 Added the osx module. 14 years ago