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