Skip to content

Commit

Permalink
clean up comments and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bcumming committed Oct 16, 2024
1 parent 03effa7 commit c5538c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/util/fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ struct temp_dir_wrap {
// persistant storage for the temporary paths that will delete the paths on
// exit. This makes temporary paths persistent for the duration of the
// application's execution.
// Use a dequeu because it will not copy/move/delete its contents as it grows.
// Use a deque because it will not copy/move/delete its contents as it grows.
static std::deque<temp_dir_wrap> tmp_dir_cache;

// the temp paths are deleted automatically when tmp_dir_cache is cleaned up
// at the end of execution, except when execvp is used to replace the current
// process.
// use this function to force early clean up in such situations, so that no
// tmp paths remain after execution.
void clear_temp_dirs() {
tmp_dir_cache.clear();
}
Expand All @@ -57,7 +62,6 @@ std::filesystem::path make_temp_dir() {
util::expected<std::filesystem::path, std::string>
unsquashfs_tmp(const std::filesystem::path& sqfs,
const std::filesystem::path& contents) {

namespace fs = std::filesystem;

if (!fs::is_regular_file(sqfs)) {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/cli.bats
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function setup() {

export SRC_PATH=$(realpath ../../)

export PATH="$(realpath ../../install/bin):$PATH"
export PATH="$(realpath ../../build):$PATH"

unset UENV_MOUNT_LIST

Expand Down

0 comments on commit c5538c4

Please sign in to comment.