-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use secure temp directory for remote sync (#10911) #10914
base: develop
Are you sure you want to change the base?
Conversation
@hifi can you have a look at this? |
in case directory could not be created or permissions could not be set
Pro: - allows use of destructor to clean up - remote handler can store file location and reuse it Con: - upload can not be called without previously calling download - currently not needed
Regarding the inability to call upload as a standalone thing, RemoteParams could include the "target" file path for using upload or download functions, if set the m_temporaryFileLocation variable is ignored. Another option is to just reintroduce the filepath variable to upload, but as an optional second parameter. |
I think it is fine as is as we currently have no standalone upload. In case, we want to add an upload only functionality, this is definitely the way to go. |
if (result.success && !params->uploadCommand.isEmpty()) { | ||
emit updateSyncProgress(75, tr("Uploading...")); | ||
result = remoteHandler->upload(result.filePath, params); | ||
result = m_remoteHandler->upload(params); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check for nullptr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Fixes #10911
Screenshots
Testing strategy
Type of change