mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-13 05:31:44 +00:00
Don't rely on Boost not trying to create a directory if a drive is mounted on one
Fix for bug 701.
This commit is contained in:
parent
0ad859814b
commit
46e684d7f6
@ -1,3 +1,8 @@
|
||||
2012-01-12 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: bug fix: Fixed writing into paths on which a drive is
|
||||
mounted on Windows. Fix for bug 701.
|
||||
|
||||
2012-01-09 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: enhancement: Added a field
|
||||
|
@ -149,8 +149,12 @@ mm_file_io_c::setup() {
|
||||
|
||||
void
|
||||
mm_file_io_c::prepare_path(const std::string &path) {
|
||||
boost::filesystem::path directory = boost::filesystem::path(path).parent_path();
|
||||
if (boost::filesystem::exists(directory))
|
||||
return;
|
||||
|
||||
boost::system::error_code error_code;
|
||||
boost::filesystem::create_directories(boost::filesystem::path(path).parent_path(), error_code);
|
||||
boost::filesystem::create_directories(directory, error_code);
|
||||
if (error_code)
|
||||
throw mtx::mm_io::create_directory_x(path, strerror(error_code.value()), error_code.value());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user