kiss-community / kiss

KISS - Package Manager, mirror of https://codeberg.org/kiss-community/kiss
https://kisslinux.org/package-manager
MIT License
17 stars 11 forks source link

kiss: sanitize tmp directory paths #49

Closed dylanaraps closed 3 years ago

dylanaraps commented 3 years ago

Ensures that // (and //////) don't occur within the temporary directory paths. Also fixes #33 which is actually a bug.

# from current master
"${log_dir:="$cac_dir/logs/${date%-*}"}" \

It uses date whereas the variable is actually named time. This causes the double // in log_dir.

Fixing this bug changes behavior whereby logs will now be stored in directories by date. I can amend this PR to retain existing behavior + fix the double // issue. Let me know.

dilyn-corner commented 3 years ago

This causes the double // in log_dir.

How long must I read before I remember that date != time... I prefer by date, as PID is granular enough, though this gets annoying if you build a package sixteen times and don't note the relevant PID...

dylanaraps commented 3 years ago

The filenames are still identical. This just puts them in a subdirectory (which has either always been broken or broke somewhere down the line). ie, let me know which behavior is more desirable and I'll make the change. We either keep behavior as-is (single-dir) or use the intended behavior (subdirectories by date).

dilyn-corner commented 3 years ago

Ah, I misread! I... Think this is better.

dilyn-corner commented 3 years ago

8b0ad92276edc184e1dc463bd27686b5e3c36048