From 98cf855b02b348dff99570834cbda764126c6191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20D=C3=B6nmez?= Date: Fri, 16 Jun 2006 19:49:03 +0000 Subject: [PATCH] fix another I/O error when trying to calculate sha1sum of a directory --- pisi/atomicoperations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pisi/atomicoperations.py b/pisi/atomicoperations.py index ca7cbefa..a62da97c 100644 --- a/pisi/atomicoperations.py +++ b/pisi/atomicoperations.py @@ -293,7 +293,7 @@ class Install(AtomicOperation): assert newf.path == oldf.path if newf.type == 'config' and oldf.type == 'config': # config upgrade fpath = pisi.util.join_path(ctx.config.dest_dir(), oldf.path) - if os.path.exists(fpath) and pisi.util.sha1_file(fpath) != oldf.hash: + if (os.path.isfile(fpath) or os.path.islink(fpath)) and os.path.exists(fpath) and pisi.util.sha1_file(fpath) == fileinfo.hash: # old config file changed, don't overwrite config_changed.append(fpath) if os.path.exists(fpath + '.old'):