Skip to content

Commit

Permalink
fixes #158 - create downloads_dir if specified directory does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
d99kris committed Dec 9, 2023
1 parent 6858b93 commit 7f721ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/common/src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

#pragma once

#define NCHAT_VERSION "4.09"
#define NCHAT_VERSION "4.10"
5 changes: 5 additions & 0 deletions lib/ncutil/src/fileutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ std::string FileUtil::GetDownloadsDir()
if (!m_DownloadsDir.empty())
{
std::string downloadsDir = FileUtil::ExpandPath(m_DownloadsDir);
if (!FileUtil::IsDir(downloadsDir))
{
FileUtil::MkDir(downloadsDir);
}

if (FileUtil::IsDir(downloadsDir))
{
return downloadsDir;
Expand Down
2 changes: 1 addition & 1 deletion src/nchat.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
.TH NCHAT "1" "December 2023" "nchat v4.09" "User Commands"
.TH NCHAT "1" "December 2023" "nchat v4.10" "User Commands"
.SH NAME
nchat \- ncurses chat
.SH SYNOPSIS
Expand Down

0 comments on commit 7f721ec

Please sign in to comment.