Patch: Elm ME+ 2.5 PLalpha63 -> Elm ME+ 2.5 PLalpha64 [3/4] (2/5)
From
Kari Hurtta@21:1/5 to
All on Tue Jul 2 20:52:51 2024
[continued from previous message]
+ folder->cur_folder_sys));
+ break;
}
DPRINT(Debug,2,(&Debug,
***************
*** 3925,3930 ****
--- 4152,4158 ----
/* we weren't able to create the lock file */
if (can_remove && old_dotfile) {
+ enum syscall_status r;
/** time to waste the lock file! Must be there in error! **/
DPRINT(Debug,2,(&Debug,
***************
*** 3937,3945 ****
lib_error(CATGETS(elm_msg_cat, ElmSet, ElmLeaveThrowingAwayLock,
"Throwing away the current lock file!"));
- if (unlink(folder->p->a.spool.lockfile) != 0) {
- int err = errno;
DPRINT(Debug,1,(&Debug,
"Error %s\n\ttrying to unlink file %s (%s)\n",
strerror(errno), folder->p->a.spool.lockfile, "lock"));
--- 4165,4176 ----
lib_error(CATGETS(elm_msg_cat, ElmSet, ElmLeaveThrowingAwayLock,
"Throwing away the current lock file!"));
+ r = unlink(folder->p->a.spool.lockfile);
+ switch (r) {
+ case syscall_error /* -1 */: {
+ int err = errno;
+
DPRINT(Debug,1,(&Debug,
"Error %s\n\ttrying to unlink file %s (%s)\n",
strerror(errno), fo