1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-12 03:34:00 +00:00

fix: use BSD stat explicitly to avoid GNU coreutils conflict (#160)

This commit is contained in:
Nathan Broadbent
2025-12-26 15:43:18 +13:00
committed by GitHub
parent b09b771dfe
commit f838e9517d
4 changed files with 5 additions and 5 deletions

View File

@@ -210,9 +210,9 @@ is_recently_modified() {
return 1
fi
# Check modification time (macOS compatible)
# Get modification time using base.sh helper (handles GNU vs BSD stat)
local mod_time
mod_time=$(stat -f "%m" "$path" 2> /dev/null || stat -c "%Y" "$path" 2> /dev/null || echo "0")
mod_time=$(get_file_mtime "$path")
local current_time=$(date +%s)
local age_seconds=$((current_time - mod_time))
local age_in_days=$((age_seconds / 86400))