]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- fix broken XA_DELETE interpretation
authorOndrej Kozina <okozina@redhat.com>
Tue, 22 Jan 2013 14:33:50 +0000 (15:33 +0100)
committerOndrej Kozina <okozina@redhat.com>
Wed, 27 Feb 2013 16:24:57 +0000 (17:24 +0100)
snapper/XAttributes.cc

index 8a022c81674ba2145114d490e14adf0a0791b6bd..5cca5cc1c57b6b7d309993dd838005fdb2321c6e 100644 (file)
@@ -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;