Merge pull request #3437 from lemondrops/plat_tempfile-fixes
Improvements to `plat_tempfile()`-generated file names
This commit is contained in:
@@ -316,7 +316,7 @@ plat_tempfile(char *bufp, char *prefix, char *suffix)
|
|||||||
name.append(QString("%1-").arg(prefix));
|
name.append(QString("%1-").arg(prefix));
|
||||||
}
|
}
|
||||||
|
|
||||||
name.append(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss-zzzz"));
|
name.append(QDateTime::currentDateTime().toString("yyyyMMdd-hhmmss-zzz"));
|
||||||
if (suffix)
|
if (suffix)
|
||||||
name.append(suffix);
|
name.append(suffix);
|
||||||
strcpy(bufp, name.toUtf8().data());
|
strcpy(bufp, name.toUtf8().data());
|
||||||
|
@@ -626,7 +626,7 @@ plat_tempfile(char *bufp, char *prefix, char *suffix)
|
|||||||
else
|
else
|
||||||
strcpy(bufp, "");
|
strcpy(bufp, "");
|
||||||
|
|
||||||
GetSystemTime(&SystemTime);
|
GetLocalTime(&SystemTime);
|
||||||
sprintf(&bufp[strlen(bufp)], "%d%02d%02d-%02d%02d%02d-%03d%s",
|
sprintf(&bufp[strlen(bufp)], "%d%02d%02d-%02d%02d%02d-%03d%s",
|
||||||
SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay,
|
SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay,
|
||||||
SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond,
|
SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond,
|
||||||
|
Reference in New Issue
Block a user