From: mfranz Date: Sun, 19 Oct 2008 16:25:05 +0000 (+0000) Subject: screenshots: check for empty screenshots-dir X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=995eaac10bc64a69a0adb466e05c02b8d1005cf9;p=flightgear.git screenshots: check for empty screenshots-dir --- diff --git a/src/GUI/gui_funcs.cxx b/src/GUI/gui_funcs.cxx index 6b4e86933..574611196 100644 --- a/src/GUI/gui_funcs.cxx +++ b/src/GUI/gui_funcs.cxx @@ -486,7 +486,10 @@ bool fgDumpSnapShot () { renderer->update( true ); renderer->update( true ); - string dir = fgGetString("/sim/paths/screenshot-dir", fgGetString("/sim/fg-current")); + string dir = fgGetString("/sim/paths/screenshot-dir"); + if (dir.empty()) + dir = fgGetString("/sim/fg-current"); + SGPath path(dir + '/'); if (path.create_dir( 0755 )) { SG_LOG(SG_GENERAL, SG_ALERT, "Cannot create screenshot directory '"