summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/process.c b/process.c
index 56b7aaf..1a104b1 100644
--- a/process.c
+++ b/process.c
@@ -700,7 +700,8 @@ int auth_finalize (void)
#if defined(WIN32) || defined(__UNIXOS2__)
if (rename(temp_name, iceauth_filename) == -1)
#else
- if (link (temp_name, iceauth_filename) == -1)
+ /* Attempt to rename() if link() fails, since this may be on a FS that does not support hard links */
+ if (link (temp_name, iceauth_filename) == -1 && rename(temp_name, iceauth_filename) == -1)
#endif
{
fprintf (stderr,