Skip to content

Commit

Permalink
Fix unmounting repository in case URL contains double slashes and dots
Browse files Browse the repository at this point in the history
  • Loading branch information
dottedmag committed Apr 5, 2010
1 parent c9b43d0 commit 5647684
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions enter.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ mounted_repos=
unmount_repos() {

for _mounted_repo in $mounted_repos; do

# If current repo directory is actually mounted
if fgrep -q "$_mounted_repo" < /etc/mtab; then
sudo umount "$_mounted_repo"
fi
# Unmount repository no matter what.
sudo umount "$_mounted_repo" 2> /dev/null || :
# Remove the repo directory and any empty parent directories
sudo rmdir -p "$_mounted_repo" 2> /dev/null || :
done
Expand Down

0 comments on commit 5647684

Please sign in to comment.