summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorMichael Larson <slioch@slioch.vyatta.com>2010-06-04 15:02:47 -0700
committerMichael Larson <slioch@slioch.vyatta.com>2010-06-04 15:02:47 -0700
commitebb51b14b961bf80917174c4ee73e693392fbd58 (patch)
tree19f54fe6a208ee101a4f0bc7476fb5ebf0904f13 /src/common
parent34c49175ab455e83efd861218e623564191ad50f (diff)
downloadvyatta-cfg-ebb51b14b961bf80917174c4ee73e693392fbd58.tar.gz
vyatta-cfg-ebb51b14b961bf80917174c4ee73e693392fbd58.zip
fix for deactivated root node that is deleted and then committed.
Bug found my Mohit.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/unionfs.c12
1 files changed, 11 insertions, 1 deletions
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);