Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gajim-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim-plugins
Commits
608fc711
Commit
608fc711
authored
Jan 08, 2021
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[omemo] Fix file download
parent
5289feab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
omemo/file_crypto.py
omemo/file_crypto.py
+7
-6
No files found.
omemo/file_crypto.py
View file @
608fc711
...
...
@@ -23,7 +23,6 @@ from urllib.parse import urlparse, unquote
from
gi.repository
import
GLib
from
gi.repository
import
Soup
from
gajim.common
import
app
from
gajim.common
import
configpaths
from
gajim.common.helpers
import
write_file_async
from
gajim.common.helpers
import
open_file
...
...
@@ -33,6 +32,7 @@ from gajim.common.filetransfer import FileTransfer
from
gajim.plugins.plugins_i18n
import
_
from
gajim.gui.dialogs
import
DialogButton
from
gajim.gui.dialogs
import
ConfirmationDialog
from
gajim.gui.filetransfer_progress
import
FileTransferProgress
from
omemo.backend.aes
import
aes_decrypt_file
...
...
@@ -73,13 +73,13 @@ class FileDecryption:
file_path
.
parent
.
mkdir
(
mode
=
0o700
,
exist_ok
=
True
)
transfer
=
OMEMODownload
(
instance
.
account
,
self
.
_cancel_download
,
urlparts
,
file_path
,
key
,
iv
)
app
.
interface
.
show_httpupload_progress
(
transfer
)
transfer
.
connect
(
'cancel'
,
self
.
_cancel_download
)
FileTransferProgress
(
transfer
)
self
.
_download_content
(
transfer
)
instance
.
plugin_modified
=
True
...
...
@@ -93,9 +93,10 @@ class FileDecryption:
self
.
_session
.
queue_message
(
message
,
self
.
_on_finished
,
transfer
)
def
_cancel_download
(
self
,
transfer
):
def
_cancel_download
(
self
,
transfer
,
_signalname
):
message
=
transfer
.
get_soup_message
()
self
.
_session
.
cancel_message
(
message
,
Soup
.
Status
.
CANCELLED
)
transfer
.
set_cancelled
()
@
staticmethod
def
_on_got_headers
(
message
,
transfer
):
...
...
@@ -212,8 +213,8 @@ class OMEMODownload(FileTransfer):
FTState
.
STARTED
:
_
(
'Downloading…'
),
}
def
__init__
(
self
,
account
,
cancel_func
,
urlparts
,
path
,
key
,
iv
):
FileTransfer
.
__init__
(
self
,
account
,
cancel_func
=
cancel_func
)
def
__init__
(
self
,
account
,
urlparts
,
path
,
key
,
iv
):
FileTransfer
.
__init__
(
self
,
account
)
self
.
_urlparts
=
urlparts
self
.
path
=
path
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment