check: Normalize symlink targets before calculating their sums

BUG:FIXED:14906
This commit is contained in:
Fatih Aşıcı
2010-10-27 09:06:17 +00:00
parent acb100f820
commit 7888cea4d4
+1 -1
View File
@@ -20,7 +20,7 @@ _ = __trans.ugettext
def file_corrupted(pfile):
path = os.path.join(ctx.config.dest_dir(), pfile.path)
if os.path.islink(path):
if pisi.util.sha1_data(os.readlink(path)) != pfile.hash:
if pisi.util.sha1_data(pisi.util.read_link(path)) != pfile.hash:
return True
else:
if pisi.util.sha1_file(path) != pfile.hash: