mirror of https://github.com/KLayout/klayout.git
Maybe fixing Windows implementation
This commit is contained in:
parent
0474884a87
commit
2d2b0f34b3
|
|
@ -1038,7 +1038,7 @@ tmpfile (const std::string &domain)
|
||||||
char *tmpstr = strdup (templ.c_str ());
|
char *tmpstr = strdup (templ.c_str ());
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
if (_mktemp_s (tmpstr, templ.size ()) != 0) {
|
if (_mktemp_s (tmpstr, templ.size () + 1) != 0) {
|
||||||
free (tmpstr);
|
free (tmpstr);
|
||||||
throw tl::Exception (tl::to_string (tr ("Unable to create temporary folder name in %s")), tmp);
|
throw tl::Exception (tl::to_string (tr ("Unable to create temporary folder name in %s")), tmp);
|
||||||
}
|
}
|
||||||
|
|
@ -1092,7 +1092,7 @@ tmpdir (const std::string &domain)
|
||||||
char *tmpstr = strdup (templ.c_str ());
|
char *tmpstr = strdup (templ.c_str ());
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
if (_mktemp_s (tmpstr, templ.size ()) != 0) {
|
if (_mktemp_s (tmpstr, templ.size () + 1) != 0) {
|
||||||
free (tmpstr);
|
free (tmpstr);
|
||||||
throw tl::Exception (tl::to_string (tr ("Unable to create temporary folder name in %s")), tmp);
|
throw tl::Exception (tl::to_string (tr ("Unable to create temporary folder name in %s")), tmp);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue