aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2015-04-06 11:07:51 +1000
committerCraig Robbins <kde.psych@gmail.com>2015-04-06 11:07:51 +1000
commit43aab618e52dd26b7d26f05db7df941489917a35 (patch)
treea157360e3958ed4c974e9075b6050535782b39e7
parent8804c47e59b550ec9a533de662f086af623d68c1 (diff)
downloadminetest-43aab618e52dd26b7d26f05db7df941489917a35.tar.gz
minetest-43aab618e52dd26b7d26f05db7df941489917a35.tar.bz2
minetest-43aab618e52dd26b7d26f05db7df941489917a35.zip
Change screenshot filename to one likely to work on all modern filesystems
Fixes #2603
-rw-r--r--src/client.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index d2bbdc284..a0740a1e8 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1709,7 +1709,7 @@ void Client::makeScreenshot(IrrlichtDevice *device)
struct tm *tm = localtime(&t);
char timetstamp_c[64];
- strftime(timetstamp_c, sizeof(timetstamp_c), "%FT%T", tm);
+ strftime(timetstamp_c, sizeof(timetstamp_c), "%Y%m%d_%H%M%S", tm);
std::string filename_base = g_settings->get("screenshot_path")
+ DIR_DELIM
@@ -1722,7 +1722,7 @@ void Client::makeScreenshot(IrrlichtDevice *device)
unsigned serial = 0;
while (serial < SCREENSHOT_MAX_SERIAL_TRIES) {
- filename = filename_base + (serial > 0 ? ("-" + itos(serial)) : "") + filename_ext;
+ filename = filename_base + (serial > 0 ? ("_" + itos(serial)) : "") + filename_ext;
std::ifstream tmp(filename.c_str());
if (!tmp.good())
break; // File did not apparently exist, we'll go with it