fix error handling of moving storage to a drive letter that isn't mounted

This commit is contained in:
Arvid Norberg 2019-06-30 11:34:40 +02:00 committed by Arvid Norberg
parent 10d061eb7f
commit 6fbeb93d50
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,4 @@
* fix error handling of moving storage to a drive letter that isn't mounted
* fix HTTP Host header when using proxy
1.2.1 release

View File

@ -278,7 +278,14 @@ namespace {
if (ec != boost::system::errc::no_such_file_or_directory)
return;
ec.clear();
if (is_root_path(f)) return;
if (is_root_path(f))
{
// this is just to set ec correctly, in case this root path isn't
// mounted
file_status s;
stat_file(f, &s, ec);
return;
}
if (has_parent_path(f))
{
create_directories(parent_path(f), ec);