Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-01-11 10:04:48 +0000
committerStijn Buys <ingar@osirion.org>2009-01-11 10:04:48 +0000
commit7082a5a1b7258580c698a09cf9fb8bec0bc97472 (patch)
tree8e74c2a0eea902d1937ed6cff936bb8b994c00a9
parent67a73b90a4c0f91ddf9322cf0ecfc6c99016e384 (diff)
suppress screenshot can't create directory warning
-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());