]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Don't write info file unless it has a name
authorAidan Van Dyk <aidan@ifax.com>
Mon, 28 Apr 2008 20:34:15 +0000 (20:34 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Mon, 28 Apr 2008 20:34:15 +0000 (20:34 +0000)
From Lee:
| commit e8b509f041eae9af7e8ee022fc1cc9e2adcb88fe
| Author: Lee Howard <faxguy@howardsilvan.com>
| Date:   Tue Nov 6 04:32:35 2007 +0000
|
|     Aha, the destructor attempts to save the values to disk even if the file
|     is obviously invalidly named.

faxd/FaxMachineInfo.c++

index a9f5ce6927ea4df17ca809becc4b906d2a24747f..c9bca8c99c1ac46fbcf7edbbdd70f7a07f0646f1 100644 (file)
@@ -331,7 +331,7 @@ void FaxMachineInfo::setDialFailures(int v)
 void
 FaxMachineInfo::writeConfig()
 {
-    if (changed) {
+    if (changed && file != "") {
        mode_t omask = umask(022);
        int fd = Sys::open(file, O_WRONLY|O_CREAT, 0644);
        (void) umask(omask);