ma1 pushed to branch base-browser-128.9.0esr-14.0-2 at The Tor Project / Applications / Tor Browser
Commits:
- 
5b1e5fc3
by Ray Kraesig at 2025-03-31T22:55:30+02:00
2 changed files:
Changes:
| ... | ... | @@ -16899,6 +16899,17 @@ | 
| 16899 | 16899 |    value: 0
 | 
| 16900 | 16900 |    mirror: always
 | 
| 16901 | 16901 | |
| 16902 | +# Whether to follow `.lnk` (etc.) shortcuts in the Windows file-open dialog.
 | |
| 16903 | +#
 | |
| 16904 | +# Valid values:
 | |
| 16905 | +#  * 0: never
 | |
| 16906 | +#  * 1: always
 | |
| 16907 | +#  * 2: auto
 | |
| 16908 | +- name: widget.windows.follow_shortcuts_on_file_open
 | |
| 16909 | +  type: RelaxedAtomicInt32
 | |
| 16910 | +  value: 2
 | |
| 16911 | +  mirror: always
 | |
| 16912 | + | |
| 16902 | 16913 |  # The number of messages of each type to keep for display in
 | 
| 16903 | 16914 |  # about:windows-messages
 | 
| 16904 | 16915 |  - name: widget.windows.messages_to_log
 | 
| ... | ... | @@ -614,19 +614,29 @@ nsFilePicker::ShowFilePicker(const nsString& aInitialDir) { | 
| 614 | 614 | |
| 615 | 615 |      // mode specific
 | 
| 616 | 616 |      switch (mMode) {
 | 
| 617 | +      case modeOpenMultiple:
 | |
| 618 | +        fos |= FOS_ALLOWMULTISELECT;
 | |
| 619 | +        [[fallthrough]];
 | |
| 620 | + | |
| 617 | 621 |        case modeOpen:
 | 
| 618 | 622 |          fos |= FOS_FILEMUSTEXIST;
 | 
| 619 | -        break;
 | |
| 620 | - | |
| 621 | -      case modeOpenMultiple:
 | |
| 622 | -        fos |= FOS_FILEMUSTEXIST | FOS_ALLOWMULTISELECT;
 | |
| 623 | +        switch (mozilla::StaticPrefs::
 | |
| 624 | +                    widget_windows_follow_shortcuts_on_file_open()) {
 | |
| 625 | +          case 1:
 | |
| 626 | +            break;
 | |
| 627 | +          default:
 | |
| 628 | +            fos |= FOS_NODEREFERENCELINKS;
 | |
| 629 | +        }
 | |
| 623 | 630 |          break;
 | 
| 624 | 631 | |
| 625 | 632 |        case modeSave:
 | 
| 626 | 633 |          fos |= FOS_NOREADONLYRETURN;
 | 
| 627 | -        // Don't follow shortcuts when saving a shortcut, this can be used
 | |
| 628 | -        // to trick users (bug 271732)
 | |
| 629 | -        if (IsDefaultPathLink()) fos |= FOS_NODEREFERENCELINKS;
 | |
| 634 | +        // Don't follow shortcuts when saving a shortcut; this can be used to
 | |
| 635 | +        // trick users (bug 271732). _Do_ follow shortcuts when not saving a
 | |
| 636 | +        // shortcut (bug 283730).
 | |
| 637 | +        if (IsDefaultPathLink()) {
 | |
| 638 | +          fos |= FOS_NODEREFERENCELINKS;
 | |
| 639 | +        }
 | |
| 630 | 640 |          break;
 | 
| 631 | 641 | |
| 632 | 642 |        case modeGetFolder:
 |