diff debian/patches/20_bins-syscall @ 4:c5749e43b1d7

Adding debian files (to original 1.1.29)
author Peter Gervai <grin@grin.hu>
date Wed, 15 Oct 2008 23:35:35 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/patches/20_bins-syscall	Wed Oct 15 23:35:35 2008 +0200
@@ -0,0 +1,35 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_bins-1.1.29-syscall.dpatch by  <rousseau@localhost.localdomain>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+--- bins-1.1.29.orig/bins
++++ bins-1.1.29/bins
+@@ -3546,13 +3546,14 @@
+                     $newpath = "$picdir$origName";
+                 }
+                 beVerboseN("Linking from $albumdir$newName to $newpath... ", 2);
+-                system("ln", "-sf", $newpath, "$albumdir$newName") == 0
++                unlink("$albumdir$newName");
++                symlink($newpath, "$albumdir$newName") == 1
+                     or die("\nCannot link $albumdir$newName to $newpath: $?");
+                 # the original file may be r/o but we don't have to modify it
+                 # but it must be readable by the http deamon
+                 if ($configHash->{updateOriginalPerms})
+                 {
+-                    system("chmod", "a+r", "$picdir$origName") == 0
++                    chmod(0644, "$picdir$origName") == 1
+                         or die("\nCannot set read permission on $albumdir$newName: $?");
+                 }
+                 beVerboseN("done.", 2);
+@@ -3563,7 +3564,7 @@
+                 system("cp", "-p", "$picdir$origName", "$albumdir$newName") == 0
+                     or die("\nCannot copy $picdir$origName to $albumdir$newName: $?");
+                 # make it writable in case $origName was r/o
+-                system("chmod", "u+w,a+r", "$albumdir$newName") == 0
++                chmod(0644, "$albumdir$newName") == 1
+                     or die("\nCannot set write permission on $albumdir$newName: $?");
+                 beVerboseN("done.", 2);
+                 return 1;