-
Notifications
You must be signed in to change notification settings - Fork 106
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
improved detection of files and directories in GoogleStorageMixin #129
Open
jesteria
wants to merge
11
commits into
stephenmcd:master
Choose a base branch
from
jesteria:gcloud-compat
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d6fbe51
Fix rmtree method of S3BotoStorageMixin
6f23b88
Fixes issue with old methods in gcs support
TysonRV d0d4a6d
Merge pull request #1 from TysonRV/trodriguez/fix_support_for_gcs
TysonRV 3d33898
Merge pull request #125 from mostlyserious/master
stephenmcd 3b86e28
Fix cs specification that is breaking compilemessages command
TysonRV 1f2bf78
Merge pull request #2 from TysonRV/trodriguez/fix_cs_specification
TysonRV 17f1146
Merge pull request #126 from TysonRV/master
stephenmcd 6ec3433
improved detection of files and directories in GoogleStorageMixin
jesteria 9f6c2f6
further refined isfile & isdir checks in GoogleStorageMixin
jesteria 7f2c233
reinstitute `isfile` check within `isdir` check
jesteria 896710a
improve file/dir detection and improve browsing performance (Google C…
jesteria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
*.pyc | ||
*.eggs/ | ||
*.egg-info | ||
.idea | ||
mezzanine-git/ |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,9 @@ def browse(request): | |
raise ImproperlyConfigured(_("Error finding Upload-Folder. Maybe it does not exist?")) | ||
redirect_url = reverse("fb_browse") + query_helper(query, "", "dir") | ||
return HttpResponseRedirect(redirect_url) | ||
abs_path = os.path.join(get_directory(), path) | ||
|
||
base_dir = get_directory() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
abs_path = os.path.join(base_dir, path) | ||
|
||
# INITIAL VARIABLES | ||
results_var = {'results_total': 0, 'results_current': 0, 'delete_total': 0, 'images_total': 0, 'select_total': 0} | ||
|
@@ -121,7 +123,7 @@ def browse(request): | |
|
||
# CREATE FILEOBJECT | ||
url_path = "/".join([s.strip("/") for s in | ||
[get_directory(), path.replace("\\", "/"), file] if s.strip("/")]) | ||
[base_dir, path.replace("\\", "/"), file] if s.strip("/")]) | ||
fileobject = FileObject(url_path) | ||
|
||
|
||
|
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.
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
browse
view performs certain checks – which with GCS are now network calls – over and over, for each object in the directory listing. this one in particular seemed unnecessary, (especially when GCS's concept of a "folder" is so uncertain as it is).