fixed bug in windows path of file.cpp

This commit is contained in:
Arvid Norberg 2008-07-20 16:34:01 +00:00
parent df27541904
commit 5ad495865e
2 changed files with 4 additions and 1 deletions

View File

@ -176,7 +176,7 @@ namespace libtorrent
std::string file_path = utf8_native(path.native_file_string());
#endif
HANDLE m_file_handle = CreateFile(
m_file_handle = CreateFile(
file_path.c_str()
, mode.m_mask
, FILE_SHARE_READ
@ -213,6 +213,7 @@ namespace libtorrent
#ifndef NDEBUG
m_open_mode = mode;
#endif
TORRENT_ASSERT(is_open());
return true;
}

View File

@ -80,6 +80,7 @@ namespace libtorrent
m_files.erase(i);
return boost::shared_ptr<file>();
}
TORRENT_ASSERT(e.file_ptr->is_open());
e.mode = m;
}
pt.replace(i, e);
@ -110,6 +111,7 @@ namespace libtorrent
e.key = st;
e.file_path = p;
pt.insert(e);
TORRENT_ASSERT(e.file_ptr->is_open());
return e.file_ptr;
}