mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-02 02:15:58 -04:00
+5
-11
@@ -118,13 +118,10 @@ File fp;
|
||||
return;
|
||||
|
||||
File temp_fp;
|
||||
char tmpname[] = "/tmp/templatecompXXXXXX";
|
||||
int tmpfd = mkstemp(tmpname);
|
||||
|
||||
if (tmpfd >= 0 && temp_fp.open(tmpname, "wt"))
|
||||
if (!temp_fp.open(tmpnam(nullptr), "wt"))
|
||||
{
|
||||
fprintf(stderr, "error opening temp file for template header "
|
||||
"replacement [%s]\n", fp.getFilename().getFullFilename().c_str());
|
||||
"replacement [%s]\n", temp_fp.getFilename().getFullFilename().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -175,7 +172,7 @@ File fp;
|
||||
}
|
||||
else if (temp_fp.puts(buffer) < 0)
|
||||
{
|
||||
fprintf(stderr, "error writing to temp header file [%s]\n", fp.getFilename().getFullFilename().c_str());
|
||||
fprintf(stderr, "error writing to temp header file [%s]\n", temp_fp.getFilename().getFullFilename().c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -246,11 +243,8 @@ int result;
|
||||
return -1;
|
||||
}
|
||||
|
||||
File temp_fp;
|
||||
char tmpname[] = "/tmp/templatecompXXXXXX";
|
||||
int tmpfd = mkstemp(tmpname);
|
||||
|
||||
if (tmpfd >= 0 && temp_fp.open(tmpname, "wt"))
|
||||
File temp_fp;
|
||||
if (!temp_fp.open(tmpnam(nullptr), "wt"))
|
||||
{
|
||||
fprintf(stderr, "error opening temp file for template source "
|
||||
"replacement [%s]\n", temp_fp.getFilename().getFullFilename().c_str());
|
||||
|
||||
Reference in New Issue
Block a user