Skip to content

Commit

Permalink
Display a proper error when we cannot create a temporary file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse committed May 1, 2024
1 parent a7b3534 commit 2f1843b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doasedit
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ then
exit 4
fi

if [ ! -r "$temp_file" ]
then
echo "Was unable to create temporary file."
exit 4
fi

mydir=$(dirname -- "$1")
cp "$mydir/$1" "$temp_file"
if [ ! $? ]
Expand Down

0 comments on commit 2f1843b

Please sign in to comment.