Commit Graph

364 Commits

Author SHA1 Message Date
Arvid Norberg 92fba05040 attempt to fix unc paths on windows 2012-03-03 21:51:15 +00:00
Arvid Norberg ad779a569c fix windows build 2012-02-23 09:13:18 +00:00
Arvid Norberg 14287b8a7b use UNC paths on windows by default 2012-02-23 06:46:23 +00:00
Arvid Norberg f1365a7a52 fail properly if NtSetFileInformation cannot be loaded 2012-02-22 09:29:07 +00:00
Arvid Norberg f23607bc05 make sparse_end support unbuffered files 2012-01-21 23:24:24 +00:00
Arvid Norberg 413c04abcf fixed windows network path recognition issue 2011-11-27 10:23:50 +00:00
Arvid Norberg 4d49d0f20d windows storage fixes 2011-11-13 04:12:56 +00:00
Arvid Norberg 0d3eb71ba1 return -1 on failure on truncating file 2011-11-02 09:07:54 +00:00
Arvid Norberg 32dfc469c3 use NtSetInformationFile to truncate files in unbuffered mode (to avoid having to close and re-open them) 2011-11-02 09:02:28 +00:00
Arvid Norberg 8e6c159c83 fix possible hang in file::readv() on windows 2011-09-15 09:43:29 +00:00
Arvid Norberg fb89e58901 fix build issue 2011-09-13 07:02:14 +00:00
Arvid Norberg 09c235c936 solaris file allocation support 2011-09-08 23:08:37 +00:00
Arvid Norberg 43c9e640ab honor IOV_MAX when using writev and readv 2011-09-05 05:47:50 +00:00
Arvid Norberg bc1e47a486 solaris fixes 2011-09-04 23:29:47 +00:00
Arvid Norberg 1b5ee819cd fixed unaligned disk access for unbuffered I/O in windows 2011-06-17 15:10:40 +00:00
Arvid Norberg 67b79cdd69 fix windows assert 2011-06-17 06:55:40 +00:00
Arvid Norberg d6c8184381 support locking files 2011-06-09 06:08:24 +00:00
Arvid Norberg e389f5963d added support for fadvise/F_RDADVISE for improved disk read performance 2011-04-26 07:03:05 +00:00
Arvid Norberg d0af936933 don't turn off read-ahead by default on files. Might impact hash checking 2011-04-25 02:15:18 +00:00
Arvid Norberg a7b8ae9e27 fixed BSD file allocation issue 2011-04-13 06:54:56 +00:00
Arvid Norberg 08c93978a6 clean up some dead code and fix windows build 2011-02-28 00:35:58 +00:00
Arvid Norberg ca106ca4e0 some warning fixes and cleanup 2011-02-24 04:25:35 +00:00
Arvid Norberg 141ada013f fixed a whole bunch of build warnings on gcc and msvc, along with some fixes discovered along the way 2011-02-21 05:24:41 +00:00
Arvid Norberg c4c1773ceb fixed some warnings 2011-02-15 10:05:25 +00:00
Arvid Norberg 7508038337 cross compiling fixes 2011-02-14 04:12:26 +00:00
Arvid Norberg 5864a883e6 fixed build warnings 2011-02-14 01:59:01 +00:00
Arvid Norberg ddd4d84a1d fixed mingw build 2011-02-02 07:41:32 +00:00
Arvid Norberg 4070c2d465 fixed stat_file issue on windows 2011-01-25 08:21:01 +00:00
Arvid Norberg 650f02eba7 fixed some windows build issues 2010-12-19 08:12:31 +00:00
Arvid Norberg d937716af0 use PtrToPtr64 for scatter/gather I/O operations 2010-11-22 00:54:39 +00:00
Arvid Norberg 7aa9352dd0 fixed file allocation issue on linux. fixed filname encoding issue with iconv() 2010-10-18 07:15:57 +00:00
Arvid Norberg 7be0604877 fixed error reporting when fallocate fails 2010-10-14 00:58:08 +00:00
Arvid Norberg 4aa809e558 potential 64 bit build issue related to zlib 2010-09-07 03:37:33 +00:00
Arvid Norberg 242392f895 added compiler warning when unicode isn't available 2010-06-06 01:18:58 +00:00
Arvid Norberg 9fd624ecb6 solaris build fixes 2010-05-02 22:26:43 +00:00
Arvid Norberg fea3bf2ced fixed build issue on windows related to GetCompressedSize() 2010-04-18 02:50:22 +00:00
Arvid Norberg 6851254fdf fixed FIEMAP support on linux 2010-04-11 00:48:48 +00:00
Arvid Norberg ef35360722 comment about posix_fallocate 2010-04-08 05:31:00 +00:00
Arvid Norberg 519d2e5819 clean up fallocate condition a bit 2010-04-08 05:09:11 +00:00
Arvid Norberg c51e0a2a86 fixed inconsistency when creating torrents with symlinks 2010-04-01 00:44:29 +00:00
Arvid Norberg 8fa2f26217 fixed bug in is_complete for windows 2010-03-21 17:40:15 +00:00
Arvid Norberg f28b9bb501 unbuffered mode for solaris 2010-03-21 17:26:21 +00:00
Arvid Norberg b2484ead10 only allocate a file if it's not already allocated (windows) 2010-03-20 08:18:49 +00:00
Arvid Norberg 6e3882a197 fixed bug in previous work-around 2010-03-08 02:55:16 +00:00
Arvid Norberg d73cf769f1 weird ubuntu std::string bug work-around 2010-03-07 21:59:02 +00:00
Arvid Norberg 8b4ce8deaa window build fix 2010-03-06 22:47:25 +00:00
Arvid Norberg ad5b0497c3 same thing but for windows (except checking if the file is fully allocated) 2010-03-06 20:47:44 +00:00
Arvid Norberg 247bd9256d fixed bug in fallocate usage and avoid trying to allocate and truncate files that don't need it to not update their modification time for no good reason 2010-03-06 20:09:18 +00:00
Arvid Norberg 08c8bfae29 more wide character and mingw fixes 2010-02-15 05:49:10 +00:00
Arvid Norberg fe5f908cc6 fixed MinGW support 2010-02-14 04:05:18 +00:00
Arvid Norberg 1b2798970c support O_NOATIME on linux and use it by default 2010-02-02 19:44:52 +00:00
Arvid Norberg c4bdd4debe fixed fallocate usage on linux distros that don't have it 2010-01-31 21:52:45 +00:00
Arvid Norberg 5471b098eb falloc build fix 2010-01-18 06:18:34 +00:00
Arvid Norberg f1be2c6b80 don't call posix_fallocate on linux if the file is fully allocated 2010-01-18 03:08:38 +00:00
Arvid Norberg 5d5ded4032 fix fallocate build with OSes that actually support it 2010-01-18 01:08:19 +00:00
Arvid Norberg 55aea5b863 improved fallocate support 2010-01-18 00:51:40 +00:00
Arvid Norberg 36809c7007 improve linux fiemap support 2010-01-17 21:56:24 +00:00
Arvid Norberg d498c129ab clear sparse flag on files that complete on windows 2010-01-09 18:40:05 +00:00
Arvid Norberg df2f2570c2 factor out page size function and make aligned allocator configurable to use posix_memalign and memalign 2009-12-09 01:55:30 +00:00
Arvid Norberg 39dae9e6dc some GCC 2.95 support fixes and some BeOS support 2009-11-28 22:41:21 +00:00
Arvid Norberg 1d6d11bf0c storage fix 2009-11-28 08:58:07 +00:00
Arvid Norberg e1aa90daab header dependency fixes 2009-11-26 21:05:57 +00:00
Arvid Norberg 562e2512b9 some vs2010 fixes 2009-11-22 23:55:54 +00:00
Arvid Norberg e9320371b8 fixed filename function 2009-11-02 04:08:37 +00:00
Arvid Norberg 9d449caf84 msvc fix 2009-10-30 03:32:24 +00:00
Arvid Norberg d2680e01d2 fixes to copy_file() to pass in permissions to open() 2009-10-28 19:52:58 +00:00
Arvid Norberg 4ecbc21101 fixing build issue introduced in filesystem check-in 2009-10-27 01:47:54 +00:00
Arvid Norberg c418165e07 replaced boost.filesystem with custom functions (improves efficiency and drops unnecessary dependencies and improves libtorrent portability) 2009-10-26 01:29:39 +00:00
Arvid Norberg 578fbccceb fix windows physical disk offset support 2009-09-07 05:31:29 +00:00
Arvid Norberg d0cb5049f7 windows support for disk physical offset 2009-09-06 07:44:45 +00:00
Arvid Norberg 79979b1ab3 file.cpp cleanup 2009-09-05 15:02:49 +00:00
Arvid Norberg bec481acdf improved disk read performance and fixed bug in storage_interface's backwards compatibility functions 2009-09-05 07:21:10 +00:00
Arvid Norberg 49f54a6f7f file alignment and disk_io_thread bug fixes 2009-09-02 16:42:33 +00:00
Arvid Norberg 9dfa35d18d merged utf8_native and convert_to_native 2009-06-22 02:19:11 +00:00
Arvid Norberg 7eb78298f3 fixed windows build issue in file, as well as expanded the comment at the static assert 2009-06-09 05:46:51 +00:00
Arvid Norberg 32a42bae99 removed some dependencies on stringstream 2009-04-13 04:22:03 +00:00
Arvid Norberg 3cd26dec64 compile time options to use readv/writev or not 2009-04-04 08:23:53 +00:00
Arvid Norberg 3499913c59 storage compact mode resume data fix 2009-03-31 08:20:34 +00:00
Arvid Norberg b809028bda uses iconv by default on linux to convert filenames from utf-8 to the current locale 2009-03-01 00:02:33 +00:00
Arvid Norberg 00916610c7 fixed wpath bug #486 2009-02-25 04:56:00 +00:00
Arvid Norberg fbc6910335 fix cast issue on 64-bit platforms 2009-02-22 20:18:42 +00:00
Arvid Norberg 13ca386838 improved support for sparse files on windows 2009-02-17 00:11:38 +00:00
Arvid Norberg 7b2be278f1 windows file fix 2009-02-17 00:00:21 +00:00
Arvid Norberg 5a30111b9b some file fixes 2009-02-16 11:04:54 +00:00
Arvid Norberg 75efebac1e allocate files on unix when allocate storage mode is used 2009-02-16 00:42:44 +00:00
Arvid Norberg 7c2d2f6d12 use SetFileValidData() on non-sparse files on windows 2009-02-14 04:18:17 +00:00
Arvid Norberg dc4d50b117 don't make files sparse when allocation mode is set on the storage (windows only) 2009-02-14 03:56:07 +00:00
Arvid Norberg 00808473e7 factor out disk_buffer_pool from disk_io_thread. refactored the file open modes to be platform independent. gave the disk_io_thread its own copy of session_settings that it shares with storage. added an unaligned_read implementation to storage. Added options to session_settings on when to open files in unbuffered mode. Added unit tests for unaligned reads 2009-01-21 07:31:49 +00:00
Arvid Norberg 52f7bbc185 assert that we always have an error code when a file fails to open 2009-01-19 09:26:11 +00:00
Arvid Norberg cedea0980f separate alignment requirements for file offset and buffer address 2009-01-19 09:21:21 +00:00
Arvid Norberg 7529225870 file windows fix 2009-01-17 18:25:27 +00:00
Arvid Norberg ae1fa3c1b5 linux file fixes 2009-01-17 09:37:40 +00:00
Arvid Norberg 5b551c1761 merged storage::readv() and storage::writev() 2009-01-17 08:35:48 +00:00
Arvid Norberg 78d3654263 fix file.cpp build on linux 2009-01-17 00:09:44 +00:00
Arvid Norberg e670f3807b file EOF fix for windows 2009-01-16 19:10:53 +00:00
Arvid Norberg a35d516b68 file EOF fix for windows 2009-01-16 18:51:54 +00:00
Arvid Norberg 6fdbe76532 file fixes 2009-01-13 19:40:14 +00:00
Arvid Norberg 43e69cd316 added extension for file attributes. Fixes problem when sharing Application bundles on OSX or hidden files on windows 2009-01-11 22:27:43 +00:00
Arvid Norberg 97e3d9f709 fixed missing file flag on windows 2009-01-11 19:54:20 +00:00
Arvid Norberg ee5a76fa65 another windows file IO fix 2009-01-11 18:10:52 +00:00
Arvid Norberg 52aa441818 File IO fixes for windows 2009-01-11 18:01:28 +00:00
Arvid Norberg ce6531640b fixed incorrect return codes 2009-01-11 10:21:18 +00:00
Arvid Norberg 27956d4dcb fixed operator precedence bug 2009-01-11 09:59:05 +00:00
Arvid Norberg 7592ad4aee updated disk IO to support unbuffered files 2009-01-11 02:02:34 +00:00
Arvid Norberg f1d229aae6 first pass of replacing coalesce writes and reads by writev and readv (no windows support yet) 2009-01-03 08:11:31 +00:00
Arvid Norberg 233f2ed00c start of use of writev instead of coalescing into a heap allocated buffer 2009-01-01 01:47:57 +00:00
Arvid Norberg ef8234efc5 fixed preprocessor defines using UNICODE instead of TORRENT_USE_WPATH. Removed old boost.filesystem replacement code to support boost 1.33 2008-12-09 03:45:58 +00:00
Arvid Norberg 09b3a865ef fixed compiler flags in pkg-config file and made header files not depend on the NDEBUG define 2008-11-29 21:33:21 +00:00
Arvid Norberg 357d548bb5 fixed boost.filesystem usage to not rely on deprecated functions 2008-11-21 23:38:07 +00:00
Arvid Norberg 535f668c5d simplified the file interface 2008-10-19 05:03:17 +00:00
Arvid Norberg 92bac424eb fixed typecast typo in file.cpp 2008-09-25 00:16:41 +00:00
Arvid Norberg 43dd90bb59 don't set executable permission of files 2008-07-22 13:02:06 +00:00
Arvid Norberg 5ad495865e fixed bug in windows path of file.cpp 2008-07-20 16:34:01 +00:00
Arvid Norberg 417855848f merged file_win.cpp and file.cpp (removed the need for file_win.cpp). The file is no longer a pimpl 2008-07-20 11:14:54 +00:00
Arvid Norberg 64727894c4 set all permission bits on files and let umask handle reducing permissions 2008-07-18 14:15:18 +00:00
Arvid Norberg 3cb1369385 improved error reporting of file errors (uses boost.system's error_code). Now permission errors are properly reported when checking files 2008-07-17 23:41:46 +00:00
Arvid Norberg 5e48b63ede removed hard coded file permission bits 2008-07-11 08:53:33 +00:00
Arvid Norberg 40d7e2ce75 moved load_file into torrent_info.cpp to make it available on windows too. Fixed the exception free path in torrent_info 2008-07-01 11:00:00 +00:00
Arvid Norberg 9c84908bb9 switched resume data parsing over to use lazy_bdecode. Improves memory allocation performance, especially noticable when heap allocations are expensive. Makes it more practical to run with malloc debug. Changed resume data interface to take a vector as opposed to a parsed structure 2008-06-30 23:14:31 +00:00
cg25 ff3e80c42f Removed svn:executable property from {c,h}pp files in branches/RC_0_13 and
trunk.
2008-06-25 14:15:21 +00:00
Arvid Norberg 9f44c577d7 updated file_win and file_pool error handling 2008-02-25 04:41:21 +00:00
Arvid Norberg 7e83c3fc51 changed storage interface to not require exceptions 2008-02-14 03:48:20 +00:00
Arvid Norberg f271a3b74b include fixes in file.cpp 2007-11-18 07:27:40 +00:00
Arvid Norberg b9fcef5941 fixed static assert being hit on linux systems 2007-10-06 17:27:53 +00:00
Arvid Norberg 966800cd5b replaced the assert macro to TORRENT_ASSERT instead of hi-jacking assert. 2007-10-05 00:30:00 +00:00
Arvid Norberg 5b8ce7f6a0 changed to use ftruncate to allocate files 2007-09-16 00:48:21 +00:00
Arvid Norberg a4ad8a6442 fixed issue where file::set_size would update the file modification date even when the size was not changed (fixes #105) 2007-08-11 15:22:06 +00:00
Arvid Norberg 3b8670626a merged back async_io branch into trunk 2007-06-10 20:46:09 +00:00
Arvid Norberg aea4e503c5 more storage state machine fixes, added test to storage unit test and fix in file::set_size 2007-05-31 23:35:48 +00:00
Arvid Norberg 5f7dd474e9 fixes to storage full allocation mode 2007-05-30 22:23:17 +00:00
Arvid Norberg 92cf13c2c2 sparse files fixes. now sets the size of the files in case sparse files are supported 2007-04-19 03:06:15 +00:00
Arvid Norberg 983b953f02 reverted last check-in 2007-03-30 20:03:18 +00:00
Arvid Norberg 5c9b9aefb3 file did not throw exception properly when file was trunkated and read 2007-03-30 19:56:53 +00:00
Arvid Norberg 8957b64c04 prepared for precompiled headers support. fixed issue where storage didn't lock the session properly. fixed typo in natpmp.cpp 2007-03-17 17:15:16 +00:00
Arvid Norberg e35fc5c4be refactored extensions and added a plugin interface. fixed file.cpp for windows 2006-11-14 00:08:16 +00:00
Arvid Norberg 8c6869b4f2 fixed the issue with the timer waiting for tracker requests when quitting, reported by Tianhao Qiu 2006-07-12 22:55:06 +00:00
Arvid Norberg 4403eac97b fixed bugs reported by Massaroddel. Tracker request peer-count could be incorrect. Empty files were not created in full allocation mode. 2006-07-08 19:41:39 +00:00
Arvid Norberg 41810b1166 merged back the asio development branch 2006-04-25 21:04:48 +00:00
Arvid Norberg c64393cb0e more vc7 fixes and unicode fix in file.cpp 2006-01-09 00:07:00 +00:00
Arvid Norberg 84ddeacea0 *** empty log message *** 2005-08-23 09:59:56 +00:00
Arvid Norberg df4466cb86 made it build on cygwin 2005-08-18 11:20:17 +00:00
Arvid Norberg a29bf51908 *** empty log message *** 2005-08-17 02:38:34 +00:00
Arvid Norberg c2b496f472 *** empty log message *** 2005-08-17 01:57:30 +00:00
Arvid Norberg 57144ea15d *** empty log message *** 2005-08-03 22:51:21 +00:00
Arvid Norberg b55a1a6766 *** empty log message *** 2004-12-21 12:30:09 +00:00
Arvid Norberg 189375b761 *** empty log message *** 2004-10-31 08:20:05 +00:00
Arvid Norberg c48f64c2ec *** empty log message *** 2004-10-16 01:10:42 +00:00
Arvid Norberg d9f0ce12a3 *** empty log message *** 2004-09-24 10:50:03 +00:00
Arvid Norberg 13f67cc077 *** empty log message *** 2004-07-19 12:38:43 +00:00
Arvid Norberg 21e3c387ca *** empty log message *** 2004-04-14 03:01:06 +00:00
Arvid Norberg b164286e52 *** empty log message *** 2004-04-04 22:15:31 +00:00
Arvid Norberg 1313fb9fb8 *** empty log message *** 2004-04-02 22:21:20 +00:00
Arvid Norberg 653a4a970d *** empty log message *** 2004-04-02 10:43:37 +00:00
Arvid Norberg 98c1c824df timeouts become longer the more times a tracker fails 2004-04-01 22:29:51 +00:00
Arvid Norberg fb8a1bb495 *** empty log message *** 2004-03-30 23:55:52 +00:00
Arvid Norberg 87222ebf3f *** empty log message *** 2004-02-19 16:47:12 +00:00
Arvid Norberg c3bbc79c22 *** empty log message *** 2004-02-19 11:35:08 +00:00
Arvid Norberg ead9297a7e *** empty log message *** 2004-01-31 15:07:49 +00:00
Arvid Norberg b9c3db8a07 *** empty log message *** 2004-01-19 19:36:55 +00:00
Arvid Norberg e257516670 took a shot at making it compile on vc6. 2004-01-18 01:58:33 +00:00
Arvid Norberg 7cda5c2de8 *** empty log message *** 2004-01-16 15:18:02 +00:00
Arvid Norberg 4f0e42c494 *** empty log message *** 2004-01-16 15:07:01 +00:00
Arvid Norberg 68d9c4f4b0 *** empty log message *** 2004-01-16 12:43:23 +00:00
Arvid Norberg 5914b3400f *** empty log message *** 2004-01-16 02:57:45 +00:00