mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-14 08:39:31 +02:00
Replace hardcoded "/tmp" by RDTempFile()
This commit is contained in:
parent
3fc6006444
commit
f6dc4712d4
1
lib/rd.h
1
lib/rd.h
@ -354,7 +354,6 @@
|
||||
* Ripper Settings
|
||||
*/
|
||||
#define RIPPER_BAR_INTERVAL 500
|
||||
#define RIPPER_TEMP_DIR "/tmp"
|
||||
#define RIPPER_TEMP_WAV "rdlibrary_rip.wav"
|
||||
#define RIPPER_TEMP_PEAK "rdlibrary_rip.dat"
|
||||
#define RIPPER_CDDB_USER "rdlibrary"
|
||||
|
@ -65,7 +65,7 @@ bool RDTextFile(const QString &data)
|
||||
proc->launch("");
|
||||
delete proc;
|
||||
#else
|
||||
strcpy(tmpfile,"/tmp/rdreportXXXXXX");
|
||||
strcpy(tmpfile,RDTempDir()+"/rdreportXXXXXX");
|
||||
int fd=mkstemp(tmpfile);
|
||||
if(fd<0) {
|
||||
QMessageBox::warning(NULL,"File Error","Unable to create temporary file");
|
||||
|
@ -84,7 +84,7 @@ CdRipper::CdRipper(QString cutname,RDCddbRecord *rec,RDLibraryConf *conf,
|
||||
// Create Temporary Directory
|
||||
//
|
||||
char path[PATH_MAX];
|
||||
strncpy(path,RIPPER_TEMP_DIR,PATH_MAX);
|
||||
strncpy(path,RDTempDir(),PATH_MAX);
|
||||
strcat(path,"/XXXXXX");
|
||||
if(mkdtemp(path)==NULL) {
|
||||
QMessageBox::warning(this,"RDLibrary - "+tr("Ripper Error"),
|
||||
|
@ -86,7 +86,7 @@ DiskRipper::DiskRipper(QString *filter,QString *group,QString *schedcode,
|
||||
// Create Temporary Directory
|
||||
//
|
||||
char path[PATH_MAX];
|
||||
strncpy(path,RIPPER_TEMP_DIR,PATH_MAX);
|
||||
strncpy(path,RDTempDir(),PATH_MAX);
|
||||
strcat(path,"/XXXXXX");
|
||||
if(mkdtemp(path)==NULL) {
|
||||
QMessageBox::warning(this,"RDLibrary - "+tr("Ripper Error"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user