diff --git a/ChangeLog b/ChangeLog index 28478f8cb..8cea584be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -76,6 +76,8 @@ * almost completely changed the storage interface (for custom storage) * added support for hashing pieces in multiple threads + * fix long filename issue (on unixes) + * fixed performance bug in DHT torrent eviction * fixed win64 build (GetFileAttributesEx) * fixed bug when deleting files for magnet links before they had metadata diff --git a/bindings/python/test.py b/bindings/python/test.py index 5582fcdcf..01fbd11fa 100644 --- a/bindings/python/test.py +++ b/bindings/python/test.py @@ -3,6 +3,9 @@ import libtorrent as lt import unittest +import time +import os +import shutil import binascii # test torrent_info @@ -21,6 +24,23 @@ class test_torrent_info(unittest.TestCase): self.assertEqual(f.file_size(0), 1234) self.assertEqual(info.total_size(), 1234) +class test_alerts(unittest.TestCase): + + def test_alert(self): + + ses = lt.session() + sett = lt.session_settings() + sett.alert_mask = 0xffffffff + ses.set_alert_mask(0xfffffff) + shutil.copy(os.path.join('..', '..', 'test', 'test_torrents', 'base.torrent'), '.') + ti = lt.torrent_info('base.torrent'); + h = ses.add_torrent({'ti': ti, 'save_path': '.'}) + time.sleep(1) + ses.remove_torrent(h) + alerts = ses.pop_alerts() + for a in alerts: + print a.message() + class test_bencoder(unittest.TestCase): def test_bencode(self): diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index 5d3ba9928..70a005309 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -373,14 +373,11 @@ POSSIBILITY OF SUCH DAMAGE. #elif defined MAXPATH #define TORRENT_MAX_PATH MAXPATH -// posix -#elif defined NAME_MAX -#define TORRENT_MAX_PATH NAME_MAX - // none of the above #else // this is the maximum number of characters in a -// path element / filename on windows +// path element / filename on windows and also on many filesystems commonly used +// on linux #define TORRENT_MAX_PATH 255 #ifdef _MSC_VER