fixed deleting sellers

This commit is contained in:
Martin Brodbeck 2018-07-18 08:17:30 +02:00
parent e766b3ff95
commit d39c72b0a2
3 changed files with 14 additions and 1 deletions

View file

@ -14,6 +14,7 @@ Database::Database(const std::string& dbname)
Database::Database()
{
namespace fs = std::filesystem;
#if defined(__linux__)
fs::path dbpath = fs::path(std::getenv("HOME")) / ".local/share/kima2-cpp";
#elif defined(__WIN64) || defined(__WIN32)
@ -21,6 +22,7 @@ Database::Database()
#else
throw std::runtime_error("Platform not supported.");
#endif
if (!fs::exists(dbpath)) {
try {
fs::create_directories(dbpath);