diff options
author | slioch <slioch@eng-140.vyatta.com> | 2009-06-09 20:15:00 -0700 |
---|---|---|
committer | slioch <slioch@eng-140.vyatta.com> | 2009-06-09 20:15:00 -0700 |
commit | 4475893fc4c756855c49361cdee0d025b16f2f80 (patch) | |
tree | b7be2964b4c41a87dcf4dce977a3988fc0e4bebc /src/common/unionfs.c | |
parent | 16e88490a63312f33ad75ee8a81a0feee9fc0d87 (diff) | |
download | vyatta-cfg-4475893fc4c756855c49361cdee0d025b16f2f80.tar.gz vyatta-cfg-4475893fc4c756855c49361cdee0d025b16f2f80.zip |
additional fix for bug 4212. root dirs needed to be reversed on del event. passes regression
Diffstat (limited to 'src/common/unionfs.c')
-rw-r--r-- | src/common/unionfs.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/common/unionfs.c b/src/common/unionfs.c index 24ff28f..80a9ba7 100644 --- a/src/common/unionfs.c +++ b/src/common/unionfs.c @@ -115,18 +115,6 @@ get_config_path(GNode *node) return buf; } - -/** - * Recurse from node identified as deleted - **/ -void -retrieve_delete_data(char* rel_data_path, GNode *node) -{ - //switch root - - return; -} - /** * **/ @@ -336,7 +324,12 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) GNode *new_node = g_node_new(vn); // new_node = g_node_insert(node, -1, new_node); new_node = insert_sibling_in_order(node,new_node); - retrieve_data(new_data_path,new_node,root,vn->_data._operation); + if (op == K_DEL_OP) { + retrieve_data(new_data_path,new_node,get_adirp(),vn->_data._operation); + } + else { + retrieve_data(new_data_path,new_node,root,vn->_data._operation); + } } } } @@ -384,7 +377,7 @@ retrieve_data(char* rel_data_path, GNode *node, char* root, NODE_OPERATION op) new_node = insert_sibling_in_order(node,new_node); char new_data_path[MAX_LENGTH_DIR_PATH]; sprintf(new_data_path,"%s/%s",rel_data_path,dirp_wo->d_name); - retrieve_data(new_data_path,new_node,root,K_DEL_OP); + retrieve_data(new_data_path,new_node,get_adirp(),K_DEL_OP); } } closedir(dp_wo); |