diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-04-02 15:04:19 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-04-02 15:04:19 -0700 |
commit | bfd1fedf32528a5fe714ba9491c5bc5dd2052e91 (patch) | |
tree | 84305f6415af8171a57dec453ee8d2a26f61e6e8 /src | |
parent | 053d42ea27a5b89f0a19a09dd347bc37c6f07948 (diff) | |
parent | 35642e2e10aff32335690a5af2710bbb9ec3ea13 (diff) | |
download | vyatta-cfg-bfd1fedf32528a5fe714ba9491c5bc5dd2052e91.tar.gz vyatta-cfg-bfd1fedf32528a5fe714ba9491c5bc5dd2052e91.zip |
Merge branch 'glendale' into hollywood
Diffstat (limited to 'src')
-rw-r--r-- | src/commit.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/commit.c b/src/commit.c index 980a98b..8fbc1d6 100644 --- a/src/commit.c +++ b/src/commit.c @@ -747,17 +747,16 @@ static boolean commit_delete_child(vtw_def *pdefp, char *child, mark_paths(&mark); if (!deleting) { int status; - /* are we marked with opaque */ push_path(&m_path, child); - push_path(&m_path, opaque_name); + switch_path(APATH); /* switch to active */ status = lstat(m_path.path, &statbuf); + switch_path(CPATH); /* back to changes */ pop_path(&m_path); - pop_path(&m_path); - if (status >= 0) { - /* brand new directory, nothing is - deleted there; - update will handle txn (both begin and end) - */ + if (status < 0) { + /* node doesn't exist in active config. it's newly created + * so we don't need to handle delete. update will handle the + * transaction (if any). + */ return TRUE; } } |