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

Disable directory download #2585

Merged
merged 15 commits into from
Apr 10, 2024
Merged

Disable directory download #2585

merged 15 commits into from
Apr 10, 2024

Conversation

mallexxx
Copy link
Collaborator

@mallexxx mallexxx commented Apr 9, 2024

Task/Issue URL: https://app.asana.com/0/1199230911884351/1201043708349615/f

Description:

  • Fixes file directory URL being considered a download

Steps to test this PR:

  1. Navigate to file:///Users/username/Downloads
  2. Validate error page is displayed, no download is initiated

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@mallexxx mallexxx requested a review from alessandroboron April 9, 2024 12:43
Copy link
Contributor

@alessandroboron alessandroboron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix works as expected!

Just a couple of suggestions:

  1. I would probably move this code in a function that returns a bool to improve readability and reduce complexity of decidePolicy(for: method.
  2. I would add tests to make sure we won’t introduce a regression in the future.

I noticed the tests failed to compile on CI but compiled locally so maybe jus try to re-run the job.

Base automatically changed from alex/add-file-types to main April 10, 2024 10:04
@mallexxx mallexxx merged commit 44f0cce into main Apr 10, 2024
17 checks passed
@mallexxx mallexxx deleted the alex/disable-folder-nav branch April 10, 2024 10:44
samsymons added a commit that referenced this pull request Apr 12, 2024
# By Dax the Duck (10) and others
# Via GitHub (6) and others
* main: (40 commits)
  Bump version to 1.83.0 (160)
  macOS VPN: Ask users to reboot if system extension was not uninstalled (#2603)
  macOS VPN: Ask users to reboot if system extension was not uninstalled (#2603)
  Fix popover not displayed reliably when VPN shortcut is unpinned (#2606)
  Automatically mark / close stale PRs (#2596)
  Update copy for DBP open button (#2586)
  Bump version to 1.83.0 (159)
  [Release PR] Fix lottie high Windowserver load (#2598)
  Bump version to 1.83.0 (158)
  BSK release 133.1.0 (#2597)
  Fix VPN bug: Nearest city breaks register requests (#2589)
  Fix lottie high Windowserver load (#2595)
  drop Downloads storyboard (#2556)
  Disable directory download (#2585)
  Add supported document types (#2581)
  Allow choosing downloads location in App Store builds (#2532)
  Fix Open Downloads not working (#2576)
  Update Privacy Dashboard URL on navigation commit (#2583)
  Percent-decode download filenames (#2584)
  Bump version to 1.83.0 (157)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
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.

2 participants