mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 03:49:20 +03:00
Settings: Attempt to fix rename issue on old macOS
Found by @hurradieweltgehtunter
This commit is contained in:
parent
90d3917481
commit
109947ba3f
1 changed files with 3 additions and 1 deletions
|
@ -125,7 +125,8 @@ Application::Application(int &argc, char **argv)
|
|||
setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
|
||||
auto confDir = ConfigFile().configPath();
|
||||
if (!QFileInfo(confDir).exists()) {
|
||||
if (confDir.endsWith('/')) confDir.chop(1); // macOS 10.11.x does not like trailing slash for rename/move.
|
||||
if (!QFileInfo(confDir).isDir()) {
|
||||
// Migrate from version <= 2.4
|
||||
setApplicationName(_theme->appNameGUI());
|
||||
#ifndef QT_WARNING_DISABLE_DEPRECATED // Was added in Qt 5.9
|
||||
|
@ -136,6 +137,7 @@ Application::Application(int &argc, char **argv)
|
|||
// We need to use the deprecated QDesktopServices::storageLocation because of its Qt4
|
||||
// behavior of adding "data" to the path
|
||||
QString oldDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
|
||||
if (oldDir.endsWith('/')) oldDir.chop(1); // macOS 10.11.x does not like trailing slash for rename/move.
|
||||
QT_WARNING_POP
|
||||
setApplicationName(_theme->appName());
|
||||
if (QFileInfo(oldDir).isDir()) {
|
||||
|
|
Loading…
Reference in a new issue