Skip to content
Snippets Groups Projects
Commit 2a95d4cf authored by rswindell's avatar rswindell
Browse files

Bug-fix to semfile_signal() - wouldn't update timestamp if file already existed

(same bug-fix as for ftouch() back in May) - this function is currently unused.
parent b39ec4e2
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* * * *
* Copyright 2006 Rob Swindell - http://www.synchro.net/copyright.html * * Copyright 2007 Rob Swindell - http://www.synchro.net/copyright.html *
* * * *
* This program is free software; you can redistribute it and/or * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
...@@ -136,7 +136,7 @@ BOOL DLLCALL semfile_signal(const char* fname, const char* text) ...@@ -136,7 +136,7 @@ BOOL DLLCALL semfile_signal(const char* fname, const char* text)
return(FALSE); return(FALSE);
if(text!=NULL) if(text!=NULL)
write(file,text,strlen(text)); write(file,text,strlen(text));
/* use utime() for force the time-stamp to that of the local system? */
close(file); close(file);
return(TRUE);
return utime(fname, /* use current date/time: */NULL)==0;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment