summaryrefslogtreecommitdiffstats
path: root/cache.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2009-08-21 16:22:29 -0400
committerFrank Ch. Eigler <fche@elastic.org>2009-08-21 16:22:29 -0400
commit72bfb1fdb84ff5e17bc2a81b1ec25215db700ceb (patch)
tree2d2c1ff5583d83fb3ff99ad9bc1c2607c0c3f4f7 /cache.cxx
parent36ef6d6a310d7a4a35a3c505d041e9fbd11125fa (diff)
downloadsystemtap-steved-72bfb1fdb84ff5e17bc2a81b1ec25215db700ceb.tar.gz
systemtap-steved-72bfb1fdb84ff5e17bc2a81b1ec25215db700ceb.tar.xz
systemtap-steved-72bfb1fdb84ff5e17bc2a81b1ec25215db700ceb.zip
PR10543: do module cache cleaning before copying new file into the cache
... otherwise the new stuff can get cleaned before use. * cache.cxx (add_to_cache): Do clean_cache() first, not last.
Diffstat (limited to 'cache.cxx')
-rw-r--r--cache.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/cache.cxx b/cache.cxx
index ee6d0bf6..b1c7908f 100644
--- a/cache.cxx
+++ b/cache.cxx
@@ -48,6 +48,10 @@ static void clean_cache(systemtap_session& s);
void
add_to_cache(systemtap_session& s)
{
+ // PR10543: clean the cache *before* we try putting something new into it.
+ // We don't want to risk having the brand new contents being erased again.
+ clean_cache(s);
+
string stapconf_src_path = s.tmpdir + "/" + s.stapconf_name;
if (s.verbose > 1)
clog << "Copying " << stapconf_src_path << " to " << s.stapconf_path << endl;
@@ -117,8 +121,6 @@ add_to_cache(systemtap_session& s)
//
// s.use_cache = false;
}
-
- clean_cache(s);
}