Skip to content

Commit

Permalink
Merge pull request #2 from tclahr/bugfix-1
Browse files Browse the repository at this point in the history
Bugfix #1
  • Loading branch information
tclahr authored Mar 27, 2020
2 parents fd6880c + 3e649c0 commit 482d5f6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.0.0] - 2020-02-04
## 1.0.1 (2020-03-26)

### Fixed
- running UAC and quickly terminating the process was making it to propose the user to delete the root folder "/" [#1](https://github.com/tclahr/uac/issues/1)

## 1.0.0 (2020-02-04)
- Initial Release
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.1
16 changes: 9 additions & 7 deletions lib/terminate.lib
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
################################################################################
terminate() {
logging I "\nCaught signal! Quitting...\n"
if [ -d "$DESTINATION_DIR/$TMP_DATA_DIR" ]; then
if ask_question_yn "Do you want to remove the temporary directory $DESTINATION_DIR/$TMP_DATA_DIR ?"; then
rm -rf "$DESTINATION_DIR/$TMP_DATA_DIR" > /dev/null
if [ ! -d "$DESTINATION_DIR/$TMP_DATA_DIR" ]; then
uprintf "Temporary directory removed successfully.\n"
else
uprintf "Cannot remove temporary directory.\n"
if [ ! -z "$DESTINATION_DIR" ] && [ ! -z "$TMP_DATA_DIR" ]; then
if [ -d "$DESTINATION_DIR/$TMP_DATA_DIR" ]; then
if ask_question_yn "Do you want to remove the temporary directory $DESTINATION_DIR/$TMP_DATA_DIR ?"; then
rm -rf "$DESTINATION_DIR/$TMP_DATA_DIR" > /dev/null
if [ ! -d "$DESTINATION_DIR/$TMP_DATA_DIR" ]; then
uprintf "Temporary directory removed successfully.\n"
else
uprintf "Cannot remove temporary directory.\n"
fi
fi
fi
fi
Expand Down

0 comments on commit 482d5f6

Please sign in to comment.