From fcb2c7891a2662e8ce31d27700afaa79a2117979 Mon Sep 17 00:00:00 2001 From: "Roger D. Peng [audrey]" Date: Mon, 11 Aug 2008 08:48:42 -0400 Subject: [PATCH] Revert "Simplify checkMap a little" This reverts commit 44724fc84ae009fb4e7a0355b3bf37d105c664be. --- R/filehash-DB1.R | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/R/filehash-DB1.R b/R/filehash-DB1.R index bf9596c..f781155 100644 --- a/R/filehash-DB1.R +++ b/R/filehash-DB1.R @@ -204,18 +204,18 @@ setMethod("checkMap", "filehashDB1", old.size }) size.change <- old.size != cur.size - - if(!size.change) - return(invisible(db)) map.orig <- getMap(db) map <- if(is.null(map.orig)) readKeyMap(filecon) - else + else if(size.change) readKeyMap(filecon, map.orig, old.size) - assign("map", map, db@meta$metaEnv) - assign("dbfilesize", cur.size, db@meta$metaEnv) - + else + map.orig + if(!identical(map, map.orig)) { + assign("map", map, db@meta$metaEnv) + assign("dbfilesize", cur.size, db@meta$metaEnv) + } invisible(db) }) -- 2.11.4.GIT