Fixed bug: Parent directories were only created if subdir was non-empty
This commit is contained in:
parent
4785f8ce64
commit
eb47e38444
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.7)
|
cmake_minimum_required (VERSION 3.7)
|
||||||
project(xdgcfg
|
project(xdgcfg
|
||||||
VERSION 0.2.1
|
VERSION 0.2.2
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,11 @@ xdgcfg::xdgcfg(const string &filename, const string &subdir)
|
||||||
if (!subdir.empty())
|
if (!subdir.empty())
|
||||||
{
|
{
|
||||||
_filepath /= subdir;
|
_filepath /= subdir;
|
||||||
|
}
|
||||||
if (!fs::exists(_filepath))
|
if (!fs::exists(_filepath))
|
||||||
{
|
{
|
||||||
fs::create_directories(_filepath);
|
fs::create_directories(_filepath);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
_filepath /= filename;
|
_filepath /= filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user