From ebb51b14b961bf80917174c4ee73e693392fbd58 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Fri, 4 Jun 2010 15:02:47 -0700 Subject: fix for deactivated root node that is deleted and then committed. Bug found my Mohit. --- src/common/unionfs.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/common/unionfs.c b/src/common/unionfs.c index 85607a3..db3addd 100644 --- a/src/common/unionfs.c +++ b/src/common/unionfs.c @@ -372,7 +372,17 @@ retrieve_data(char* rel_data_path, GNode *node, const char* root, if (strncmp(dirp->d_name,DELETED_NODE,4) == 0) { strcpy(data_buf,dirp->d_name+4); //SKIP THE .WH. - vn->_data._operation = K_DEL_OP; + + //special test for deleted .disable file. + char buf[MAX_LENGTH_HELP_STR]; + sprintf(buf,"%s/%s/%s/%s",get_adirp(),rel_data_path,data_buf,DISABLE_FILE); + struct stat s; + if (lstat(buf,&s) == 0) { + vn->_data._operation = K_NO_OP; + } + else { + vn->_data._operation = K_DEL_OP; + } } else { strcpy(data_buf,dirp->d_name); -- cgit v1.2.3