don't make files sparse when allocation mode is set on the storage (windows only)

This commit is contained in:
Arvid Norberg
2009-02-14 03:56:07 +00:00
parent 3187bd9905
commit dc4d50b117
3 changed files with 7 additions and 3 deletions

View File

@@ -193,7 +193,7 @@ namespace libtorrent
}
// try to make the file sparse if supported
if ((mode & rw_mask) == write_only || (mode & rw_mask) == read_write)
if (mode & file::sparse)
{
DWORD temp;
::DeviceIoControl(m_file_handle, FSCTL_SET_SPARSE, 0, 0