From: Ondrej Kozina Date: Tue, 22 Jan 2013 14:33:50 +0000 (+0100) Subject: - fix broken XA_DELETE interpretation X-Git-Tag: v0.1.3~18^2~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5116fc3c94768f08f5967cbb481f7b829016ab2;p=thirdparty%2Fsnapper.git - fix broken XA_DELETE interpretation --- diff --git a/snapper/XAttributes.cc b/snapper/XAttributes.cc index 8a022c81..5cca5cc1 100644 --- a/snapper/XAttributes.cc +++ b/snapper/XAttributes.cc @@ -80,7 +80,7 @@ namespace snapper throw IOErrorException(); } - y2deb("XAttribute value size for xattribute name: '" << name << "' is " << size); + y2deb("XAttribute value size for xattribute name: '" << name << "' is " << v_size); uint8_t *buffer = new uint8_t[v_size]; @@ -180,8 +180,9 @@ namespace snapper } else { - (*change_map)[XA_DELETE].push_back(src_cit->first); - it = this->xamap->erase(it); + (*change_map)[XA_DELETE].push_back(it->first); + xa_map_iter tmp = it++; + this->xamap->erase(tmp); } } @@ -196,7 +197,8 @@ namespace snapper while (it != this->xamap->end()) { (*change_map)[XA_DELETE].push_back(it->first); - it = this->xamap->erase(it); + xa_map_iter tmp = it++; + it = this->xamap->erase(tmp); } this->xachmap = change_map;