mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 15:20:29 +01:00
2018-08-16 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up warning in 'RDTempFile()'.
This commit is contained in:
@@ -972,7 +972,13 @@ QString RDTempDir()
|
||||
QString RDTempFile()
|
||||
{
|
||||
#ifndef WIN32
|
||||
return QString(tmpnam(NULL));
|
||||
int fd=-1;
|
||||
char dirname[PATH_MAX];
|
||||
strncpy(dirname,"/tmp/rivendellXXXXXX",PATH_MAX);
|
||||
if((fd=mkstemp(dirname))>0) {
|
||||
close(fd);
|
||||
return QString(dirname);
|
||||
}
|
||||
#endif // WIN32
|
||||
return QString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user