diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-01 17:11:00 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-01 17:12:56 +0200 |
commit | 053ea3aa1c443c368f8b43591e3e970e12b50c70 (patch) | |
tree | 2a4d6dad70b60b8b34b619d25bb439ac60e85d06 | |
parent | 0846972b7a3b60b21a27c80a374788987efeb432 (diff) |
make sure saves aren't written to the wrong directory
-rw-r--r-- | editor/save.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/save.cpp b/editor/save.cpp index 6b712589..a665cada 100644 --- a/editor/save.cpp +++ b/editor/save.cpp @@ -14,7 +14,10 @@ static bool ensure_save_directory() { auto dir = Path::join(loader.TEMP_PATH, save_dir); if (Path::make(save_dir)) + { + fm_assert(Path::exists(Path::join(loader.TEMP_PATH, "CMakeCache.txt"_s))); return true; + } else { fm_warn("failed to create save directory '%s'", save_dir); |