fix another I/O error when trying to calculate sha1sum of a directory

This commit is contained in:
İsmail Dönmez
2006-06-16 19:49:03 +00:00
parent 8b689a438e
commit 98cf855b02
+1 -1
View File
@@ -293,7 +293,7 @@ class Install(AtomicOperation):
assert newf.path == oldf.path assert newf.path == oldf.path
if newf.type == 'config' and oldf.type == 'config': # config upgrade if newf.type == 'config' and oldf.type == 'config': # config upgrade
fpath = pisi.util.join_path(ctx.config.dest_dir(), oldf.path) 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 # old config file changed, don't overwrite
config_changed.append(fpath) config_changed.append(fpath)
if os.path.exists(fpath + '.old'): if os.path.exists(fpath + '.old'):