New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dealing with symlink pointing to directories (fix #11) #12
base: master
Are you sure you want to change the base?
Conversation
Now shell-safe-rm will consider a symlink to a directory like a regular file
in travis environment (or when Trash directory doesn't exist) we need to answer yes when calling shell-safe-rm for the first time
# if is dir and not a symbolick link | ||
if [[ -d "$file" && ! -L "$file" ]]; then | ||
|
||
# if a directory, and without '-r' option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one level of indentation: those are clauses evaluated in directory
condition
# up to date and its recipe would not be executed. To avoid this problem you | ||
# can explicitly declare the target to be phony by making it a prerequisite of | ||
# the special target | ||
# TODO: is test directory really needed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that there is a test
directory, but I didn't understand if such code is useful or not. I need to define the .PHONY
target rule in order to do tests
This will solve #11 |
merge for now |
Now shell-safe-rm will consider a symlink to a directory like a regular file; Added indentation in
directory
condition