forked from premiere/premiere-libtorrent
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());
|
std::string file_path = utf8_native(path.native_file_string());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
HANDLE m_file_handle = CreateFile(
|
m_file_handle = CreateFile(
|
||||||
file_path.c_str()
|
file_path.c_str()
|
||||||
, mode.m_mask
|
, mode.m_mask
|
||||||
, FILE_SHARE_READ
|
, FILE_SHARE_READ
|
||||||
|
@ -213,6 +213,7 @@ namespace libtorrent
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
m_open_mode = mode;
|
m_open_mode = mode;
|
||||||
#endif
|
#endif
|
||||||
|
TORRENT_ASSERT(is_open());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ namespace libtorrent
|
||||||
m_files.erase(i);
|
m_files.erase(i);
|
||||||
return boost::shared_ptr<file>();
|
return boost::shared_ptr<file>();
|
||||||
}
|
}
|
||||||
|
TORRENT_ASSERT(e.file_ptr->is_open());
|
||||||
e.mode = m;
|
e.mode = m;
|
||||||
}
|
}
|
||||||
pt.replace(i, e);
|
pt.replace(i, e);
|
||||||
|
@ -110,6 +111,7 @@ namespace libtorrent
|
||||||
e.key = st;
|
e.key = st;
|
||||||
e.file_path = p;
|
e.file_path = p;
|
||||||
pt.insert(e);
|
pt.insert(e);
|
||||||
|
TORRENT_ASSERT(e.file_ptr->is_open());
|
||||||
return e.file_ptr;
|
return e.file_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue