From 502b414e674721e08ea99aaa9e513b5665281765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20Healy?= Date: Mon, 20 Apr 2026 15:27:33 +0100 Subject: [PATCH] Add more safety. --- git-portfolio | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git-portfolio b/git-portfolio index 3b5d615..895c0d7 100755 --- a/git-portfolio +++ b/git-portfolio @@ -6,6 +6,10 @@ if [ -d "$repos" ]; then fi mkdir -p "$repos" tmp_portfolio="/tmp/portfolio-$(cat /dev/urandom | base64 | tr -d '=+/' | head -c 8)" +if [ -d "$tmp_portfolio" ]; then + echo "Error: Temporary directory '$tmp_portfolio' already exists." + exit 1 +fi function safely_remove_tmp_repos() { if [ "$repos" ] && [ -d "$repos" ]; then if [ "$(find -name .git -type d | wc -l)" -eq 0 ]; then