ma1 pushed to branch tor-browser-128.9.0esr-14.0-2 at The Tor Project / Applications / Tor Browser
Commits:
-
1faf2996
by Ray Kraesig at 2025-03-31T22:34:04+02:00
2 changed files:
Changes:
... | ... | @@ -16907,6 +16907,17 @@ |
16907 | 16907 | value: 0
|
16908 | 16908 | mirror: always
|
16909 | 16909 | |
16910 | +# Whether to follow `.lnk` (etc.) shortcuts in the Windows file-open dialog.
|
|
16911 | +#
|
|
16912 | +# Valid values:
|
|
16913 | +# * 0: never
|
|
16914 | +# * 1: always
|
|
16915 | +# * 2: auto
|
|
16916 | +- name: widget.windows.follow_shortcuts_on_file_open
|
|
16917 | + type: RelaxedAtomicInt32
|
|
16918 | + value: 2
|
|
16919 | + mirror: always
|
|
16920 | + |
|
16910 | 16921 | # The number of messages of each type to keep for display in
|
16911 | 16922 | # about:windows-messages
|
16912 | 16923 | - 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:
|