File: 16-fix-symlink-update-detection.patch

package info (click to toggle)
zip 3.0-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,588 kB
  • sloc: ansic: 50,445; asm: 3,907; makefile: 858; sh: 42
file content (15 lines) | stat: -rw-r--r-- 445 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
From: Marcin Owsiany <marcin@owsiany.pl>
Subject: Fix symlink update detection
Bug-Debian: https://bugs.debian.org/1005943

--- a/unix/unix.c
+++ b/unix/unix.c
@@ -423,7 +423,7 @@
     }
   }
   if (n != NULL)
-    *n = (s.st_mode & S_IFMT) == S_IFREG ? s.st_size : -1L;
+    *n = ((s.st_mode & S_IFMT) == S_IFREG || (s.st_mode & S_IFMT) == S_IFLNK) ? s.st_size : -1L;
   if (t != NULL) {
     t->atime = s.st_atime;
     t->mtime = s.st_mtime;