Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix race condition in shtool's mkdir -p implementation (bug #51076)

  • Loading branch information...
commit dcfb8ee366f7993aa3c22a25ba018faa9c5f7cdc 1 parent bf7de28
@rgeissert rgeissert authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 build/shtool
View
6 build/shtool
@@ -991,7 +991,11 @@ mkdir )
if [ ".$opt_t" = .yes ]; then
echo "mkdir $pathcomp" 1>&2
fi
- mkdir $pathcomp || errstatus=$?
+ mkdir $pathcomp || {
+ _errstatus=$?
+ [ -d "$pathcomp" ] || errstatus=${_errstatus}
+ unset _errstatus
+ }
if [ ".$opt_o" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chown $opt_o $pathcomp" 1>&2
Please sign in to comment.
Something went wrong with that request. Please try again.