File r915410.diff of Package kdelibs4

------------------------------------------------------------------------
r915410 | mueller | 2009-01-23 00:20:38 +0100 (Fr, 23. Jan 2009) | 4 lines

add a workaround for cifs/samba 2.x oddity. better
fix in trunk.
BUG: 156759

------------------------------------------------------------------------
Index: kdecore/io/klockfile_unix.cpp
===================================================================
--- kdecore/io/klockfile_unix.cpp	(Revision 915409)
+++ kdecore/io/klockfile_unix.cpp	(Revision 915410)
@@ -173,7 +173,9 @@ static KLockFile::LockResult lockFile(co
   if (st_buf != st_buf2 || S_ISLNK(st_buf.st_mode) || S_ISLNK(st_buf2.st_mode))
   {
      // SMBFS supports hardlinks by copying the file, as a result the above test will always fail
-     if ((st_buf.st_nlink == 1) && (st_buf2.st_nlink == 1) && (st_buf.st_ino != st_buf2.st_ino))
+     // cifs increases link count artifically but the inodes are still different
+     if ((st_buf2.st_nlink > 1 ||
+         ((st_buf.st_nlink == 1) && (st_buf2.st_nlink == 1))) && (st_buf.st_ino != st_buf2.st_ino))
      {
         linkCountSupport = testLinkCountSupport(uniqueName);
         if (!linkCountSupport)
openSUSE Build Service is sponsored by