Fixed OSX/Unix compatability problem in OverwriteOutputFile
There is a problem in gtk g_remove on Unix/OSX, as it just redefines g_remove to remove without giving a namespace. This may collide if your program defines a remove(char*) as well.
This commit is contained in:
parent
49c42c9242
commit
3d288c971b
@ -351,12 +351,13 @@ Glib::ustring BatchQueue::autoCompleteFileName (const Glib::ustring& fileName, c
|
|||||||
|
|
||||||
int fileExists=Glib::file_test (fname, Glib::FILE_TEST_EXISTS);
|
int fileExists=Glib::file_test (fname, Glib::FILE_TEST_EXISTS);
|
||||||
|
|
||||||
/*if (inOverwriteMode && fileExists) {
|
if (inOverwriteMode && fileExists) {
|
||||||
if (g_remove(safe_locale_from_utf8(fname).c_str ()) == -1)
|
// do NOT use g_remove as it has compiler problems on Unix and OSX (GTK namespace problem)
|
||||||
|
if (::remove(safe_locale_from_utf8(fname).c_str ()) == -1)
|
||||||
inOverwriteMode = false; // failed to delete- revert to old naming scheme
|
inOverwriteMode = false; // failed to delete- revert to old naming scheme
|
||||||
else
|
else
|
||||||
fileExists = false; // deleted now
|
fileExists = false; // deleted now
|
||||||
}*/
|
}
|
||||||
|
|
||||||
if (!fileExists) {
|
if (!fileExists) {
|
||||||
return fname;
|
return fname;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user