| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Avoid non-nil argument errors | Tatsuhiro Tsujikawa | 2023-09-18 | 1 | -2/+2 |
| | | | | | | Use std::copy_n and std::fill_n to avoid a non-nil argument error with memcpy/memset. | ||||
| * | clang-format-12 | Tatsuhiro Tsujikawa | 2021-10-30 | 1 | -1/+1 |
| | | |||||
| * | flush OS write buffers before saving control file | Ali MJ Al-Nasrawy | 2020-06-17 | 1 | -0/+12 |
| | | | | | | | | | | | This ensures that pieces are physically written to disk before marking them as finished in the control file. This should prevent data loss and corruption when resuming downloads after a system crash. Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com> | ||||
| * | Enable IndentPPDirectives | Tatsuhiro Tsujikawa | 2018-06-09 | 1 | -20/+20 |
| | | |||||
| * | clang-format-5.0 | Tatsuhiro Tsujikawa | 2017-11-23 | 1 | -22/+27 |
| | | |||||
| * | MacOS: Allocate once (apfs compat) | Nils Maier | 2017-11-01 | 1 | -16/+12 |
| | | |||||
| * | Propagate disk full error on pre-allocation to last error code | Tatsuhiro Tsujikawa | 2017-02-23 | 1 | -13/+24 |
| | | |||||
| * | Clang-format and small amends | Tatsuhiro Tsujikawa | 2016-05-31 | 1 | -3/+4 |
| | | | | | | mapaddr_ is always nullptr in this context, so no need to set to nullptr again. | ||||
| * | fixed mmap failure check with MAP_FAILED flag | suzker | 2016-05-27 | 1 | -3/+7 |
| | | |||||
| * | Compare filesize directly to the numeric max of size_t | suzker | 2016-05-25 | 1 | -2/+1 |
| | | |||||
| * | added filesize overflow check for mmap on 32bit os | suzker | 2016-05-24 | 1 | -0/+8 |
| | | |||||
| * | Don't inherit file descriptor to child process | Tatsuhiro Tsujikawa | 2016-02-08 | 1 | -0/+1 |
| | | | | | | | For non-Mingw32 build, set FD_CLOEXEC to file descriptors which live beyond function scope. For Mingw32 build, just pass false to bInheritHandles parameter of CreateProcessW. | ||||
| * | mingw: Use SetFileValidData to make --file-allocation=falloc work | Tatsuhiro Tsujikawa | 2016-01-28 | 1 | -0/+9 |
| | | |||||
| * | mingw: Add formatLastError as wrapper function for FormatMessage | Tatsuhiro Tsujikawa | 2016-01-28 | 1 | -7/+5 |
| | | |||||
| * | make clang-format using clang-format-3.6 | Tatsuhiro Tsujikawa | 2015-12-27 | 1 | -194/+191 |
| | | |||||
| * | Use cached filesize instead of calling size() again | Tatsuhiro Tsujikawa | 2015-11-14 | 1 | -1/+1 |
| | | |||||
| * | Don't enable mmap if file allocation is disabled | Tatsuhiro Tsujikawa | 2015-11-12 | 1 | -5/+11 |
| | | | | | | | | Without file allocation, we cannot map file because file length could be zero. This could fix bug reported at GH-478 | ||||
| * | Disard cache when checking checksum | Tatsuhiro Tsujikawa | 2014-07-02 | 1 | -0/+8 |
| | | | | | This will slow down checksum checking but does not thrash cache. | ||||
| * | OSX: Use F_NOCACHE instead of F_GLOBAL_NOCACHE | Nils Maier | 2014-05-26 | 1 | -2/+2 |
| | | | | | | The latter persists for the lifetime of the file, while the former affects only the current descriptor. | ||||
| * | Fix (unknown length) downloads larger than 2GiB | Nils Maier | 2014-05-25 | 1 | -0/+1 |
| | | | | | Closes #215 | ||||
| * | Fix F_PREALLOC based allocation on some OSX versions | Nils Maier | 2014-05-08 | 1 | -4/+12 |
| | | |||||
| * | Remove unused function getWin32Handle | Nils Maier | 2014-05-08 | 1 | -9/+0 |
| | | |||||
| * | Implement falloc equivalent in OSX | Nils Maier | 2014-04-12 | 1 | -0/+18 |
| | | |||||
| * | Clean up if defined style | Tatsuhiro Tsujikawa | 2013-09-17 | 1 | -2/+2 |
| | | |||||
| * | Convert most 0/NULL pointers to nullptr | Nils Maier | 2013-08-20 | 1 | -4/+4 |
| | | | | | Courtesy of llvm cpp11-migrate 3.3 | ||||
| * | Support off64_t for Android build | Tatsuhiro Tsujikawa | 2013-05-06 | 1 | -2/+2 |
| | | | | | | | | | Android NDK R8e does not provide ftruncate64, but bionic has the assembler code to access kernel function. We borrowed those ftruncate64.S files from android source code repository. It turns out that x86 asm.h in NDK R8e is also broken, so latest asm.h was also borrowed. | ||||
| * | mingw32: Make NTFS sparse file on --file-allocation=trunc | Tatsuhiro Tsujikawa | 2013-01-11 | 1 | -1/+13 |
| | | |||||
| * | mingw32: Use HANDLE only for MinGW32 build | Tatsuhiro Tsujikawa | 2012-12-15 | 1 | -67/+95 |
| | | |||||
| * | Removed warning when --file-allocation=falloc is used in MinGW32 build | Tatsuhiro Tsujikawa | 2012-12-06 | 1 | -5/+0 |
| | | | | | | The warning was just a mistake. SetFilePointerEx + SetEndOfFile actually allocate disk space. | ||||
| * | mingw32: Removed FSCTL_SET_SPARSE set | Tatsuhiro Tsujikawa | 2012-12-03 | 1 | -8/+0 |
| | | |||||
| * | mingw32: Open file using _wsopen and added --enable-mmap support | Tatsuhiro Tsujikawa | 2012-12-01 | 1 | -137/+180 |
| | | | | | | | | | | | | | | | | | | I tried CreateFile but the subsequent ReadFile fails with Access Denied if sparse file is read on NTFS. I mostly reverted previous changes and use _wsopen with read/write share enabled instead of CreateFile. This change also includes --enable-mmap support for MinGW32 build. Memory mapped file may be useful for 64-bits OS and lots of RAM. Currently, FlushViewOfFile is not called during the download, so it is slightly vulnerable against sudden power loss. I found lots of read when resuming download due to page fault. So for now it is useful for the initial download. I recommend not to use --file-allocation=prealloc with --enable-mmap for MinGW32, because it triggers page faults even in the initial download. Anyway, the option is experimental. | ||||
| * | Use Win32 API for file I/O in AbstractDiskWriter | Tatsuhiro Tsujikawa | 2012-11-30 | 1 | -41/+135 |
| | | | | | Now file has been opened by aria2 is now readable by other processes. | ||||
| * | Set F_GLOBAL_NOCACHE for Mac OS X | Tatsuhiro Tsujikawa | 2012-11-28 | 1 | -0/+3 |
| | | |||||
| * | Refactored file open code | Tatsuhiro Tsujikawa | 2012-11-28 | 1 | -25/+21 |
| | | |||||
| * | Removed trailing spaces | Tatsuhiro Tsujikawa | 2012-10-01 | 1 | -1/+1 |
| | | |||||
| * | Use int64_t instead of off_t | Tatsuhiro Tsujikawa | 2012-07-23 | 1 | -14/+14 |
| | | | | | | | | | Using off_t, at least, in DiskAdaptor layer is problematic because torrent can contain under 2GiB files but total sum of those files may exceed 2GiB limit, which makes off_t overflow in 32 bit system without large file support. So we use int64_t in API. We'll check the file length before download so that it does not exceed max off_t. | ||||
| * | Use PRId64 for int64_t format specifier | Tatsuhiro Tsujikawa | 2012-06-25 | 1 | -2/+2 |
| | | |||||
| * | Added --enable-mmap option. | Tatsuhiro Tsujikawa | 2012-06-24 | 1 | -18/+97 |
| | | | | | | If this option is used, map files into memory using mmap(2). This option is experimental. | ||||
| * | No retry for close() with EINTR. Also reverted changes in d5ffa253. | Tatsuhiro Tsujikawa | 2011-12-25 | 1 | -15/+3 |
| | | |||||
| * | Log filename in the exception when AbstractDiskWriter::closeFile() failed. | Tatsuhiro Tsujikawa | 2011-12-10 | 1 | -2/+4 |
| | | |||||
| * | AbstractDiskWriter::closeFile(): Throw exception if close() failed. | Tatsuhiro Tsujikawa | 2011-12-09 | 1 | -2/+12 |
| | | | | | | | | | | | | ~AbstractDiskWriter calles closeFile(), but suppresses exception. MultiDiskAdaptor::closeFile() logs error if child DiskWriter::closeFile() throws exception. This exception is not rethrown. If at least one exception is caught, MultiDiskAdaptor::closeFile() throws new DlAbortEx. RequestGroupMan::closeFile() just logs exception and suppress each exception. Generally, don't call closeFile() in destructor. If you need to call it, it must suppress the exception. | ||||
| * | Replaced uint64_t with off_t or int64_t. | Tatsuhiro Tsujikawa | 2011-12-09 | 1 | -5/+5 |
| | | | | | | Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t. | ||||
| * | Added global::cerr. windows.h now included from common.h | Tatsuhiro Tsujikawa | 2011-08-10 | 1 | -4/+0 |
| | | | | | | | | We replaced most of std::cerr with global::cerr. windows.h is now included from common.h. Before including it, we define WINVER. We renamed some variable name because some macros in windows.h collide with them. | ||||
| * | Removed utf8ToNative from log message and exception message. | Tatsuhiro Tsujikawa | 2011-08-08 | 1 | -6/+6 |
| | | |||||
| * | In MinGW32, open file with UNICODE filename and print them in ANSI. | Tatsuhiro Tsujikawa | 2011-08-04 | 1 | -10/+11 |
| | | |||||
| * | Removed use of O_DIRECT because it performs bad. | Tatsuhiro Tsujikawa | 2011-07-16 | 1 | -22/+1 |
| | | |||||
| * | Implemented fast file allocation in MinGW32 build. | Tatsuhiro Tsujikawa | 2011-06-07 | 1 | -1/+18 |
| | | | | | | | We use SetFilePointerEx and SetEndOfFile to allocate extents. This only works with NTFS. To enable this feature, --file-allocation=falloc must be given. | ||||
| * | Use %lx for DWORD. | Tatsuhiro Tsujikawa | 2010-12-19 | 1 | -1/+1 |
| | | | | | GetLastError() returns DWORD, not C-String. | ||||
| * | Fixed compile error which occurs when system has posix_fallocate() but | Tatsuhiro Tsujikawa | 2010-12-05 | 1 | -1/+1 |
| | | | | | does not have fallocate(). | ||||
| * | Added more error code values. | Tatsuhiro Tsujikawa | 2010-12-01 | 1 | -27/+45 |
| | | | | | | I have not set error code for all exception invocation. In this change, I set error code where error likely occurs. | ||||
