]> git.mxchange.org Git - flightgear.git/commitdiff
screenshots: check for empty screenshots-dir
authormfranz <mfranz>
Sun, 19 Oct 2008 16:25:05 +0000 (16:25 +0000)
committermfranz <mfranz>
Sun, 19 Oct 2008 16:25:05 +0000 (16:25 +0000)
src/GUI/gui_funcs.cxx

index 6b4e86933da08ef7446775ef6cc726f9c763b387..5746111963097196a445ec44a4093d525bfbafce 100644 (file)
@@ -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 '"