Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/render/screenshot.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/render/screenshot.cc b/src/render/screenshot.cc
index e006344..aa5aa9e 100644
--- a/src/render/screenshot.cc
+++ b/src/render/screenshot.cc
@@ -34,8 +34,11 @@ void Screenshot::save()
// make sure the screenshots folder exists
filename.assign(filesystem::writedir());
- filename.append("screenshots/");
- sys::mkdir(filename);
+ filename.append("screenshots");
+ if (!sys::isdirectory(filename)) {
+ sys::mkdir(filename);
+ }
+ filename += '/';
aux::lowercase(screenshotformat->str());