Skip to content

Commit 43aab61

Browse files
committedApr 6, 2015
Change screenshot filename to one likely to work on all modern filesystems
Fixes #2603
1 parent 8804c47 commit 43aab61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎src/client.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,7 @@ void Client::makeScreenshot(IrrlichtDevice *device)
17091709
struct tm *tm = localtime(&t);
17101710

17111711
char timetstamp_c[64];
1712-
strftime(timetstamp_c, sizeof(timetstamp_c), "%FT%T", tm);
1712+
strftime(timetstamp_c, sizeof(timetstamp_c), "%Y%m%d_%H%M%S", tm);
17131713

17141714
std::string filename_base = g_settings->get("screenshot_path")
17151715
+ DIR_DELIM
@@ -1722,7 +1722,7 @@ void Client::makeScreenshot(IrrlichtDevice *device)
17221722
unsigned serial = 0;
17231723

17241724
while (serial < SCREENSHOT_MAX_SERIAL_TRIES) {
1725-
filename = filename_base + (serial > 0 ? ("-" + itos(serial)) : "") + filename_ext;
1725+
filename = filename_base + (serial > 0 ? ("_" + itos(serial)) : "") + filename_ext;
17261726
std::ifstream tmp(filename.c_str());
17271727
if (!tmp.good())
17281728
break; // File did not apparently exist, we'll go with it

0 commit comments

Comments
 (0)
Please sign in to comment.