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

Migrate old configs #5362

Merged
merged 7 commits into from
Jan 30, 2023
Merged

Migrate old configs #5362

merged 7 commits into from
Jan 30, 2023

Conversation

camilasan
Copy link
Member

@camilasan camilasan commented Jan 23, 2023

Due to changes in the config file name, there has been issues when the desktop client.

We already had code that did migrate configs from different folders, now this change would check for previous config files independent of the name. It will back up the previous config and rename the file to the new application name when there is an update of the client version.

  1. I am sure there might be drawbacks to this. wdyt?

  2. There is already a notification in place to tell the user there is a previous config.

Previous config:
previous config

Notification:
notification

New config:
new-config

After another upgrade, it should proceed to doing backups:
another-upgrade

@camilasan camilasan changed the title Bugfix/migrate Migrate old configs Jan 23, 2023
@camilasan camilasan marked this pull request as draft January 23, 2023 15:07
src/libsync/configfile.h Outdated Show resolved Hide resolved
src/libsync/configfile.cpp Outdated Show resolved Hide resolved
src/libsync/configfile.cpp Outdated Show resolved Hide resolved
src/libsync/configfile.cpp Outdated Show resolved Hide resolved
src/gui/application.cpp Outdated Show resolved Hide resolved
src/gui/application.cpp Outdated Show resolved Hide resolved
src/gui/application.cpp Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 23, 2023

Codecov Report

Merging #5362 (8ffaf34) into master (9cb1609) will decrease coverage by 0.25%.
The diff coverage is n/a.

❗ Current head 8ffaf34 differs from pull request most recent head a3e08aa. Consider uploading reports for the commit a3e08aa to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5362      +/-   ##
==========================================
- Coverage   58.24%   57.99%   -0.25%     
==========================================
  Files         141      139       -2     
  Lines       18008    17728     -280     
==========================================
- Hits        10488    10282     -206     
+ Misses       7520     7446      -74     
Impacted Files Coverage Δ
src/common/utility.cpp 68.12% <0.00%> (-3.35%) ⬇️
src/common/syncjournaldb.cpp 77.98% <0.00%> (-0.81%) ⬇️
src/libsync/propagatedownload.cpp 65.75% <0.00%> (-0.77%) ⬇️
src/libsync/syncengine.cpp 81.17% <0.00%> (-0.25%) ⬇️
src/libsync/owncloudpropagator.cpp 86.40% <0.00%> (-0.23%) ⬇️
src/libsync/propagatorjobs.cpp 77.96% <0.00%> (-0.18%) ⬇️
src/libsync/networkjobs.cpp 51.22% <0.00%> (-0.15%) ⬇️
src/csync/csync_exclude.cpp 89.54% <0.00%> (-0.08%) ⬇️
src/csync/csync.h 75.00% <0.00%> (ø)
src/common/utility.h 0.00% <0.00%> (ø)
... and 12 more

@camilasan camilasan marked this pull request as ready for review January 23, 2023 16:38
Copy link
Collaborator

@claucambra claucambra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small readability comments

src/gui/application.cpp Outdated Show resolved Hide resolved
src/gui/application.cpp Outdated Show resolved Hide resolved
Camila added 7 commits January 30, 2023 09:44
Use QStandardPaths::writableLocation instead.

Signed-off-by: Camila <hello@camila.codes>
Signed-off-by: Camila <hello@camila.codes>
Signed-off-by: Camila <hello@camila.codes>
…hange of the client.

Signed-off-by: Camila <hello@camila.codes>
Signed-off-by: Camila <hello@camila.codes>
Signed-off-by: Camila <hello@camila.codes>
@mgallien mgallien merged commit a7013c5 into master Jan 30, 2023
@mgallien mgallien deleted the bugfix/migrate branch January 30, 2023 09:01
@sonarcloud
Copy link

sonarcloud bot commented Jan 30, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@nextcloud-desktop-bot
Copy link

AppImage file: nextcloud-PR-5362-a3e08aae3b6b9ac0e198ce8523f113c0a4959219-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.

@mgallien mgallien added this to the 3.7.0 milestone Jan 30, 2023
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.

5 participants