555 |
sprintf (tmp, "%08lX", GetTickCount ()); |
sprintf (tmp, "%08lX", GetTickCount ()); |
556 |
name = tmp; |
name = tmp; |
557 |
} |
} |
558 |
|
|
559 |
|
/* in the mobile mode we use a local temp folder |
560 |
|
with the fixed name 'temp'. */ |
561 |
|
if (mobile_mode_active) { |
562 |
|
_snprintf (buf, buflen-1, "temp\\%s", name); |
563 |
|
return 0; |
564 |
|
} |
565 |
|
|
566 |
if (!GetTempPath (buflen - strlen (name) -2, buf)) { |
if (!GetTempPath (buflen - strlen (name) -2, buf)) { |
567 |
log_debug ("GetTempPath() failed ec=%d\n", (int)GetLastError ()); |
log_debug ("GetTempPath() failed ec=%d\n", (int)GetLastError ()); |
568 |
return -1; |
return -1; |