diff options
| author | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2025-08-29 00:49:35 +0500 |
|---|---|---|
| committer | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2025-08-29 00:49:35 +0500 |
| commit | d2a46bc17fda50adf824dd447ee52a31f8339bc7 (patch) | |
| tree | 84b55ac2c547c487ee67bf0c377104071a955142 | |
| parent | 973e70672c76fddd191cc91f735d6d31323f3d4e (diff) | |
submodules/timer_uncache: Look for files only
Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com>
| -rw-r--r-- | submodules/timer_uncache.zsh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/submodules/timer_uncache.zsh b/submodules/timer_uncache.zsh index 4b2840e..c639999 100644 --- a/submodules/timer_uncache.zsh +++ b/submodules/timer_uncache.zsh @@ -7,20 +7,20 @@ then return 0 fi -for file in $(ls -1 "${cache}") +for file in $(find "${cache}" -follow -type f) do - until mkdir "${cache}/${file%.*}.lock" + until mkdir "${file%.*}.lock" do sleep 1 done file_ctime=$(strftime %s) - file_mtime=$(stat +mtime "${cache}/${file}") + file_mtime=$(stat +mtime "${file}") if [[ $((file_ctime - file_mtime)) -gt $((cache_time + 20)) ]] then - rm -f "${cache}/${file}" + rm -f "${file}" fi - rmdir "${cache}/${file%.*}.lock" + rmdir "${file%.*}.lock" done |
