mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-24 13:41:14 -05:00
Force saving files inside ~/OnionShare if running in flatpak
This commit is contained in:
parent
aa60123cf3
commit
0ae2d7f611
@ -24,7 +24,7 @@ from onionshare.web import Web
|
|||||||
|
|
||||||
from ..history import History, ToggleHistory, ReceiveHistoryItem
|
from ..history import History, ToggleHistory, ReceiveHistoryItem
|
||||||
from .. import Mode
|
from .. import Mode
|
||||||
from ....widgets import MinimumWidthWidget
|
from ....widgets import MinimumWidthWidget, Alert
|
||||||
|
|
||||||
|
|
||||||
class ReceiveMode(Mode):
|
class ReceiveMode(Mode):
|
||||||
@ -135,6 +135,11 @@ class ReceiveMode(Mode):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if selected_dir:
|
if selected_dir:
|
||||||
|
# If we're running inside a flatpak package, the data dir must be inside ~/OnionShare
|
||||||
|
if self.common.gui.is_flatpak:
|
||||||
|
if not selected_dir.startswith(os.path.expanduser("~/OnionShare")):
|
||||||
|
Alert(self.common, strings._("gui_receive_flatpak_data_dir"))
|
||||||
|
|
||||||
self.common.log(
|
self.common.log(
|
||||||
"ReceiveMode",
|
"ReceiveMode",
|
||||||
"data_dir_button_clicked",
|
"data_dir_button_clicked",
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
"gui_receive_start_server": "Start Receive Mode",
|
"gui_receive_start_server": "Start Receive Mode",
|
||||||
"gui_receive_stop_server": "Stop Receive Mode",
|
"gui_receive_stop_server": "Stop Receive Mode",
|
||||||
"gui_receive_stop_server_autostop_timer": "Stop Receive Mode ({} remaining)",
|
"gui_receive_stop_server_autostop_timer": "Stop Receive Mode ({} remaining)",
|
||||||
|
"gui_receive_flatpak_data_dir": "Because you installed OnionShare using flatpak, you must save files to a folder in ~/OnionShare.",
|
||||||
"gui_copy_url": "Copy Address",
|
"gui_copy_url": "Copy Address",
|
||||||
"gui_copy_hidservauth": "Copy HidServAuth",
|
"gui_copy_hidservauth": "Copy HidServAuth",
|
||||||
"gui_canceled": "Canceled",
|
"gui_canceled": "Canceled",
|
||||||
@ -209,4 +210,4 @@
|
|||||||
"mode_settings_receive_data_dir_label": "Save files to",
|
"mode_settings_receive_data_dir_label": "Save files to",
|
||||||
"mode_settings_receive_data_dir_browse_button": "Browse",
|
"mode_settings_receive_data_dir_browse_button": "Browse",
|
||||||
"mode_settings_website_disable_csp_checkbox": "Disable Content Security Policy header (allows your website to use third-party resources)"
|
"mode_settings_website_disable_csp_checkbox": "Disable Content Security Policy header (allows your website to use third-party resources)"
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user