Package: rhash
Version: 1.3.1-1
Followup-For: Bug #750842

Dear Maintainer,

I've added a very simple patch (for UNIX systems at least), but now symlinks 
are ignored. I don't know if this is the best behaviour.

Regards


-- System Information:
Debian Release: 7.5
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable'), (550, 'testing'), (500, 
'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages rhash depends on:
ii  libc6      2.18-7
ii  librhash0  1.3.1-1

Versions of packages rhash recommends:
ii  libssl1.0.0  1.0.1e-2+deb7u10

rhash suggests no packages.

-- no debconf information
diff -ruN rhash-1.3.1/common_func.c rhash-1.3.1-patched/common_func.c
--- rhash-1.3.1/common_func.c	2014-01-08 14:38:42.000000000 +0100
+++ rhash-1.3.1-patched/common_func.c	2014-06-09 11:22:14.055461450 +0200
@@ -430,7 +430,10 @@
 	file->mtime = st.st_mtime;
 
 	file->mode  = 0;
-	if(S_ISDIR(st.st_mode)) file->mode |= FILE_IFDIR;
+	if(S_ISLNK(st.st_mode))
+            file->mode |= FILE_IFLNK;
+	else if(S_ISDIR(st.st_mode))
+            file->mode |= FILE_IFDIR;
 
 	return res;
 #endif /* _WIN32 */
diff -ruN rhash-1.3.1/common_func.h rhash-1.3.1-patched/common_func.h
--- rhash-1.3.1/common_func.h	2014-01-08 14:38:42.000000000 +0100
+++ rhash-1.3.1-patched/common_func.h	2014-06-09 11:20:20.630897661 +0200
@@ -95,6 +95,7 @@
 #define FILE_IFROOT  0x10
 #define FILE_IFSTDIN 0x20
 #define FILE_ISDIR(file) ((file)->mode & FILE_IFDIR)
+#define FILE_ISLNK(file) ((file)->mode & FILE_IFLNK)
 
 /* file functions */
 
diff -ruN rhash-1.3.1/find_file.c rhash-1.3.1-patched/find_file.c
--- rhash-1.3.1/find_file.c	2014-01-08 15:49:56.000000000 +0100
+++ rhash-1.3.1-patched/find_file.c	2014-06-09 11:23:19.131783488 +0200
@@ -210,7 +210,7 @@
 				log_file_error(file->path);
 			}
 			continue;
-		} else {
+		} else if (! FILE_ISLNK(file)) {
 			/* process a regular file or a dash '-' path */
 			data->call_back(file, data->call_back_data);
 		}
@@ -409,7 +409,7 @@
 				/* process the file or directory */
 				if(FILE_ISDIR(&file) && (flags & (FIND_WALK_DEPTH_FIRST | FIND_SKIP_DIRS))) {
 					res = 1;
-				} else {
+				} else if (! FILE_ISLNK(&file)) {
 					/* handle file by callback function */
 					res = options->call_back(&file, options->call_back_data);
 				}
diff -ruN rhash-1.3.1/.pc/.quilt_patches rhash-1.3.1-patched/.pc/.quilt_patches
--- rhash-1.3.1/.pc/.quilt_patches	1970-01-01 01:00:00.000000000 +0100
+++ rhash-1.3.1-patched/.pc/.quilt_patches	2014-06-09 11:19:12.478560408 +0200
@@ -0,0 +1 @@
+debian/patches
diff -ruN rhash-1.3.1/.pc/.quilt_series rhash-1.3.1-patched/.pc/.quilt_series
--- rhash-1.3.1/.pc/.quilt_series	1970-01-01 01:00:00.000000000 +0100
+++ rhash-1.3.1-patched/.pc/.quilt_series	2014-06-09 11:19:12.478560408 +0200
@@ -0,0 +1 @@
+series
diff -ruN rhash-1.3.1/.pc/.version rhash-1.3.1-patched/.pc/.version
--- rhash-1.3.1/.pc/.version	1970-01-01 01:00:00.000000000 +0100
+++ rhash-1.3.1-patched/.pc/.version	2014-06-09 11:19:12.478560408 +0200
@@ -0,0 +1 @@
+2

Reply via email to