diff options
-rw-r--r-- | src/render/screenshot.cc | 7 |
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()); |