mirror of
https://github.com/tmux-plugins/tmux-cpu.git
synced 2026-09-10 07:16:16 -04:00
Merge pull request #83 from pacien/helpers-cache-atomic-write-fix
This commit is contained in:
commit
98d787191b
|
|
@ -130,8 +130,10 @@ put_cache_val() {
|
|||
val="${*:2}"
|
||||
tmpdir="$(get_tmp_dir)"
|
||||
[ ! -d "$tmpdir" ] && mkdir -p "$tmpdir" && chmod 0700 "$tmpdir"
|
||||
get_time >"$tmpdir/$key"
|
||||
echo -n "$val" >>"$tmpdir/$key"
|
||||
(
|
||||
get_time
|
||||
echo -n "$val"
|
||||
) >"$tmpdir/$key"
|
||||
echo -n "$val"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue