Fix standard mode folder comparison view generating "---" in results table#677
Merged
Conversation
* In standard mode, for folder comparison, dupe type is wrongly set as core.fs.Folder while it should be core.se.fs.Folder. * Catching the NotImplementedError exception redirects to the appropriate handler * This is only a temporary workaround until a better fix is implemented
* results.py doesn't set the proper type for dupes at the line "file = get_file(path)" so we add it on top * Perhap it could have been added to _get_fileclasses() in core.app.py too but I have not tested it
arsenetar
reviewed
Jun 24, 2020
| def _create_file(self, path): | ||
| # We add fs.Folder to fileclasses in case the file we're loading contains folder paths. | ||
| return fs.get_file(path, self.fileclasses + [fs.Folder]) | ||
| return fs.get_file(path, self.fileclasses + [se.fs.Folder] + [fs.Folder]) |
Owner
There was a problem hiding this comment.
Replacing fs.Folder with se.fs.Folder should be fine in all cases from what I can tell.
Contributor
Author
There was a problem hiding this comment.
I suppose you're right. It seems the function called will return the first fileclass.can_handle(path) anyway... https://github.com/arsenetar/dupeguru/blob/master/core/fs.py#L257
Contributor
Author
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fileclassesattribute fixes the problemWARNING: this pull request might need some more proper testing.