Package: fuseiso / 20070708-7

symlink-size.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Report correct size of symlinks, instead of 0
 Original author's headerlines were
 Date: Mon, 30 Sep 2024 13:02:34 +0200
 Subject: stat(2) on S_IFLNK: st_size = correct instead of 0
Bug-Debian: https://bugs.debian.org/1083039
Forwarded: not-needed
Author: =?utf-8?b?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz>
Last-Update: 2024-10-16
--- a/src/isofs.c
+++ b/src/isofs.c
@@ -530,6 +530,9 @@ static int isofs_direntry2stat(struct stat *st, isofs_inode *inode) {
     // so it is better to save it unique
     st->st_ino = inode->st_ino;
     
+    if(inode->SL) {
+        st->st_size = inode->sl_len;
+    } else
     if(inode->ZF) { // compressed file, report real (uncompressed) size
         st->st_size = inode->real_size;
     } else { // no zisofs compression