Skip to content
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

always propagate locked status to read-only or read/write for real file #5841

Merged
merged 4 commits into from
Jul 12, 2023

Conversation

mgallien
Copy link
Collaborator

@mgallien mgallien commented Jun 23, 2023

make sure that a file locked that would not be modifiable by the current client is read-only on storage

also make sure we make a file read/write when modification can happen again

Close #5537

@mgallien mgallien marked this pull request as ready for review June 23, 2023 11:51
@mgallien
Copy link
Collaborator Author

/backport to stable-3.9

@mgallien mgallien enabled auto-merge June 23, 2023 11:51
@mgallien mgallien force-pushed the bugfix/lockedFileShouldBeReadOnly branch 2 times, most recently from 9de4574 to fa18fa7 Compare June 29, 2023 07:13
@mgallien mgallien force-pushed the bugfix/lockedFileShouldBeReadOnly branch from fa18fa7 to 3c893e5 Compare July 3, 2023 11:58
@mgallien mgallien force-pushed the bugfix/lockedFileShouldBeReadOnly branch 5 times, most recently from 6d21c43 to ffea7b3 Compare July 11, 2023 20:19
make sure that a file locked that would not be modifiable by the
current client is read-only on storage

also make sure we make a file read/write when modification can happen
again

Close #5537

Signed-off-by: Matthieu Gallien <[email protected]>
should help investigate failure for automated tests

Signed-off-by: Matthieu Gallien <[email protected]>
we try to preserve complex existing permissions unless the client is
required to change them significantly

Signed-off-by: Matthieu Gallien <[email protected]>
will fix behavior on windows by properly setting the new temp file just
downloaded have the proper state (read only or read/write) and not the
already existing file that will be replaced by the newly odwnloaded one

Signed-off-by: Matthieu Gallien <[email protected]>
@mgallien mgallien force-pushed the bugfix/lockedFileShouldBeReadOnly branch from ffea7b3 to bc28bc4 Compare July 12, 2023 11:42
@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-5841-bc28bc43c3fdd0fbc3b532aae4671e9a878df1af-x86_64.AppImage

To test this change/fix you can simply download above AppImage file and test it.

Please make sure to quit your existing Nextcloud app and backup your data.

@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #5841 (bc28bc4) into master (cb4ec73) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5841      +/-   ##
==========================================
+ Coverage   60.08%   60.13%   +0.05%     
==========================================
  Files         145      145              
  Lines       18711    18718       +7     
==========================================
+ Hits        11242    11256      +14     
+ Misses       7469     7462       -7     
Impacted Files Coverage Δ
src/libsync/propagatedownload.cpp 66.85% <100.00%> (+0.32%) ⬆️

... and 5 files with indirect coverage changes

@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Linux Desktop client does not unlock files
3 participants