fixed bug in windows path of file.cpp
This commit is contained in:
parent
df27541904
commit
5ad495865e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue