Package: metapixel
Version: 1.0.2-7.1+b2
Severity: normal
Tags: patch upstream

If original file comes from another directory, symlink would be relative to 
that directory, not a current one, so mere symlink path would not be 
sufficient.  With a given patch it would get a full path to the original file

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing'), (600, 'unstable'), (300, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.17-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages metapixel depends on:
ii  libc6            2.19-18
ii  libgif4          4.1.6-11
ii  libjpeg62-turbo  1:1.4.0-7
ii  libpng12-0       1.2.50-2+b2
ii  zlib1g           1:1.2.8.dfsg-2+b1

metapixel recommends no packages.

metapixel suggests no packages.

-- no debconf information
--- /usr/bin/metapixel-prepare	2014-10-14 19:15:49.000000000 -0400
+++ bin/metapixel-prepare	2015-07-21 15:45:28.405104037 -0400
@@ -27,6 +27,7 @@
 
 use Getopt::Long;
 use File::Basename;
+use Cwd 'abs_path';
 use IO::Handle;
 
 sub disambiguate_filename {
@@ -121,12 +122,14 @@
 
 	    print "Testing file: $fullname\n" if $DEBUG;
 
-	    while (-l $fullname) {
+	    if (-l $fullname) {
 		print "Following symlink: $fullname\n" if $DEBUG;
-		$fullname = readlink($fullname);
+		# Get full path since it might be relevant to original directory
+		$fullname = abs_path($fullname);
+		print "Got: $fullname\n" if $DEBUG;
 	    }
 
-	    if (-f $fullname && -r $fullname) {
+	    if (-f $fullname && -e $fullname) {
 		my ($name, $path, $suffix) = fileparse($fullname);
 
 		print "Processing: $fullname\n" if $DEBUG;

Reply via email to