Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[vault] Fix directory creation. Contributes to JB#51753
If a directory doesn't exist the full path of the directory needs to be
checked when creating it to avoid execution flow being dependent on the
working directory.
  • Loading branch information
llewelld committed Nov 2, 2020
1 parent e446d01 commit 9b849f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/unit.cpp
Expand Up @@ -244,7 +244,7 @@ void create_dst_dirs(map_type const &item)
{
QString path = item["full_path"].toString();
if (!QFileInfo(item["src"].toString()).isDir())
path = QFileInfo(path).dir().dirName();
path = QFileInfo(path).dir().absolutePath();

if (!QFileInfo(path).isDir()) {
if (!QDir().mkpath(path) && item["required"].toBool())
Expand Down

0 comments on commit 9b849f3

Please sign in to comment.