Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bunop
Copy link
Contributor

@bunop bunop commented Mar 31, 2017

Now shell-safe-rm will consider a symlink to a directory like a regular file; Added indentation in directory condition

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
Copy link
Contributor Author

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?
Copy link
Contributor Author

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 testdirectory, 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

@bunop
Copy link
Contributor Author

bunop commented Mar 31, 2017

This will solve #11

@bunop bunop changed the title Dealing with symlink pointing to directories (fixes #11) Dealing with symlink pointing to directories (solve #11) Mar 31, 2017
@bunop bunop changed the title Dealing with symlink pointing to directories (solve #11) Dealing with symlink pointing to directories (fix #11) Mar 31, 2017
@kaelzhang
Copy link
Owner

kaelzhang commented Apr 10, 2017

merge for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants