-
Notifications
You must be signed in to change notification settings - Fork 65
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
sam rm: fixed command behavior when combine -d/-s/-f options + enabled '.' and '..' inputs #580
sam rm: fixed command behavior when combine -d/-s/-f options + enabled '.' and '..' inputs #580
Conversation
In a folder with directories and sequences: * Before this commit: * sam rm dirToRemove seqToRemove -d: only dirToRemove * sam rm dirToRemove seqToRemove -s: only seqToRemove * sam rm dirToRemove seqToRemove -ds: nothing * After this commit: * sam rm dirToRemove seqToRemove -d: only dirToRemove * sam rm dirToRemove seqToRemove -s: only seqToRemove * sam rm dirToRemove seqToRemove -ds: both dirToRemove and seqToRemove
* Log the exception message in debug.
* Fix tuttleofx#570 * After this commit, we can use this kind of command to remove recursively all sequences in the working directory: sam rm . -Rs
In case of permission denied for example.
dfd200f
to
805ca01
Compare
try: | ||
subFolder = os.path.join(item.getFolder(), item.getFilename()) | ||
self.logger.debug('Browse in sub folder"' + subFolder + '" with the following filters: ' + str(filters)) | ||
newItems = sequenceParser.browse(subFolder, detectionMethod, filters) |
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.
It seems that this is not recursive.
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.
Because of the potential exception?
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.
sequenceParser.browse
browse the input folder but not recursively. And I don't see any code around to make the recursion.
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.
The instruction just below:
self._removeItems(newItems, args, detectionMethod, filters)
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.
Oh yes, you're right! I didn't see that it's the same function.
Fix #570