This patch creates $XDG_CACHE_HOME if it doesn't exist, rather than
just aborting.
* tools/abipkgdiff.cc (package::extracted_packages_parent_dir):
Ensure that the cache directory is created, even when
XDG_CACHE_HOME is set. Also, remove the now useless "using
abigail::tools_utils::get_random_number_as_string" statement.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
if (p.empty())
p = "~";
p += "/.cache/libabigail";
- // Create directory $HOME/.cache/libabigail/ if it doesn't
- // exist
- bool cache_dir_is_created = ensure_dir_path_created(p);
- assert(cache_dir_is_created);
}
- using abigail::tools_utils::get_random_number_as_string;
+
+ // Create the cache directory if it doesn't exist
+ bool cache_dir_is_created = ensure_dir_path_created(p);
+ assert(cache_dir_is_created);
string libabigail_tmp_dir_template = p;
libabigail_tmp_dir_template += "/abipkgdiff-tmp-dir-XXXXXX";