1
0
Fork 0

screenshots: check for empty screenshots-dir

This commit is contained in:
mfranz 2008-10-19 16:25:05 +00:00
parent dc2341b643
commit 995eaac10b

View 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 '"