Mercurial > bins
view debian/patches/20_bins-syscall @ 5:e8a9408780ff
Merging them togther
author | Peter Gervai <grin@grin.hu> |
---|---|
date | Wed, 15 Oct 2008 23:36:49 +0200 |
parents | c5749e43b1d7 |
children |
line wrap: on
line source
#! /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;