View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0017992 | Scribus | OS-MacOSX | public | 2026-10-01 10:22 | 2026-10-26 19:27 |
| Reporter | jaca101 | Assigned To | jghali | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | MacBook M1 pro | OS | MacOS Tahoe 26.6.2 | OS Version | 26.6.2 (25G83) |
| Product Version | 1.7.4.svn | ||||
| Fixed in Version | 1.6.7.svn | ||||
| Summary | 0017992: Starting with --prefs <dir> moves the Scribus 1.5/1.6 preference files out of the default profile | ||||
| Description | When Scribus 1.7 is started with "--prefs <dir>" (a separate preferences profile), it moves the legacy preference files of Scribus 1.5/1.6 (scribus150.rc, prefs150.xml, and the other *150 files) from the default location into <dir>. They are moved, not copied: an installed Scribus 1.6.x that still uses the default location starts with default settings afterwards. On macOS both versions share ~/Library/Preferences/Scribus/, so simply trying 1.7 with a test profile strips the settings of the user's working 1.6 installation. It happened to me while testing a 1.7 build next to Scribus 1.6.6; the files had to be moved back by hand. Cause: PrefsManager::copyOldAppConfigAndData() migrates the legacy files with moveFile() into m_prefsLocation. Without --prefs that location is the default profile, so the move does no harm (on macOS source and target are even the same directory). With --prefs it is a different, separate profile, and the move takes the files away from the default profile. Fix (patch attached, against trunk r27875): when a custom prefs dir is in use (ScQApp->userPrefsDir() not empty), copy the legacy files instead of moving them. Migration into the default profile is unchanged. | ||||
| Steps To Reproduce | 1. Have Scribus 1.5/1.6 preferences in the default location, e.g. on macOS ~/Library/Preferences/Scribus/scribus150.rc and prefs150.xml. 2. Start Scribus 1.7 with: scribus --prefs /some/empty/dir 3. Quit and look at both directories. -> Expected: scribus150.rc and prefs150.xml are still in the default location; /some/empty/dir gets copies. -> Actual: they have been moved to /some/empty/dir; Scribus 1.6 now starts with default settings. | ||||
| Additional Information | Environment: macOS 26.6 (Tahoe), Apple Silicon, Qt 6.11.2 (Homebrew), Scribus 1.7.4.svn trunk r27875, Scribus 1.6.6 also installed. Verified with the patch applied, in a sandboxed HOME with dummy *150 files and --prefs pointing to an empty directory: the source files stay in place and the --prefs profile receives byte-identical copies (checked with cmp), from which it creates its *172 files. The plugin data / scrapbook / swatches moves in the same function were left unchanged: their source is the prefs dir itself. The patch was prepared with AI assistance (Claude Code) and reviewed and tested by me; it carries a Co-Authored-By trailer. | ||||
| Tags | No tags attached. | ||||
| Attached Files | 0003-Prefs-copy-instead-of-move-legacy-prefs-into-a-prefs.patch (4,891 bytes)
From 011ac81d3a7e48633a8bfc9a821308192d86db1d Mon Sep 17 00:00:00 2001
From: Satoshi Nakamoto <satoshi.nakamoto.xdos@proton.me>
Date: Thu, 1 Oct 2026 03:27:20 +0200
Subject: [PATCH 3/9] Prefs: copy instead of move legacy prefs into a --prefs
profile
PrefsManager::copyOldAppConfigAndData() migrates legacy files (old
dotfiles and the 1.5/1.6 scribus150.rc, prefs150.xml, ...) into the
preferences location by moving them. When Scribus is started with
--prefs <dir>, that location is a separate profile, so the move took the
files away from the default profile. On macOS this strips the settings
of an installed Scribus 1.6.x, which keeps reading them from
~/Library/Preferences/Scribus/.
When a custom prefs dir is in use, copy the legacy files instead. The
default-profile migration still moves them as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---
scribus/prefsmanager.cpp | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/scribus/prefsmanager.cpp b/scribus/prefsmanager.cpp
index 8d9c931e9..a652e8b2d 100644
--- a/scribus/prefsmanager.cpp
+++ b/scribus/prefsmanager.cpp
@@ -792,55 +792,62 @@ void PrefsManager::copyOldAppConfigAndData()
if (QFile::exists(m_prefsLocation + "scribus172.rc") && QFile::exists(m_prefsLocation + "prefs172.xml"))
return;
+ // A prefs dir given with --prefs is a separate profile: copy legacy files into it instead of
+ // moving them, so the default profile (still used by older Scribus versions) keeps its settings.
+ const bool customPrefsDir = !ScQApp->userPrefsDir().isEmpty();
+ auto migrateFile = [customPrefsDir](const QString& source, const QString& target) {
+ return customPrefsDir ? copyFile(source, target) : moveFile(source, target);
+ };
+
//Move to using the ScPaths default prefs location/scribus.* from ~/.scribus.*
QString oldPR = QDir::toNativeSeparators(QDir::homePath() + "/.scribus.rc");
QString newPR = QDir::toNativeSeparators(m_prefsLocation + "/scribus.rc");
QFileInfo oldPi(oldPR);
if (oldPi.exists() && !QFile::exists(newPR))
- moveFile(oldPR, m_prefsLocation + "scribus.rc");
+ migrateFile(oldPR, m_prefsLocation + "scribus.rc");
QString oldPR2 = QDir::toNativeSeparators(QDir::homePath() + "/.scribusfont.rc");
QString newPR2 = QDir::toNativeSeparators(m_prefsLocation + "/scribusfont.rc");
QFileInfo oldPi2(oldPR2);
if (oldPi2.exists() && !QFile::exists(newPR2))
- moveFile(oldPR2, m_prefsLocation + "scribusfont.rc");
+ migrateFile(oldPR2, m_prefsLocation + "scribusfont.rc");
QString oldPR3 = QDir::toNativeSeparators(QDir::homePath() + "/.scribusscrap.scs");
QString newPR3 = QDir::toNativeSeparators(m_prefsLocation + "/scrap.scs");
QFileInfo oldPi3(oldPR3);
if (oldPi3.exists() && !QFile::exists(newPR3))
- moveFile(oldPR3, m_prefsLocation + "scrap.scs");
+ migrateFile(oldPR3, m_prefsLocation + "scrap.scs");
QString oldPrefsLocation(ScPaths::oldApplicationDataDir());
QString oldPR4 = QDir::toNativeSeparators(oldPrefsLocation + "scribus150.rc");
QString newPR4 = QDir::toNativeSeparators(m_prefsLocation + "scribus150.rc");
QFileInfo oldPi4(oldPR4);
if (oldPi4.exists() && !QFile::exists(newPR4))
- moveFile(oldPR4, m_prefsLocation + "scribus150.rc");
+ migrateFile(oldPR4, m_prefsLocation + "scribus150.rc");
QString oldPR5 = QDir::toNativeSeparators(oldPrefsLocation + "scrap150.scs");
QString newPR5 = QDir::toNativeSeparators(m_prefsLocation + "scrap150.scs");
QFileInfo oldPi5(oldPR5);
if (oldPi5.exists() && !QFile::exists(newPR5))
- moveFile(oldPR5, m_prefsLocation + "scrap150.scs");
+ migrateFile(oldPR5, m_prefsLocation + "scrap150.scs");
QString oldPR6 = QDir::toNativeSeparators(oldPrefsLocation + "prefs150.xml");
QString newPR6 = QDir::toNativeSeparators(m_prefsLocation + "prefs150.xml");
QFileInfo oldPi6(oldPR6);
if (oldPi6.exists() && !QFile::exists(newPR6))
- moveFile(oldPR6, m_prefsLocation + "prefs150.xml");
+ migrateFile(oldPR6, m_prefsLocation + "prefs150.xml");
QString oldPR7 = QDir::toNativeSeparators(oldPrefsLocation + "scripter150.rc");
QString newPR7 = QDir::toNativeSeparators(m_prefsLocation + "scripter150.rc");
QFileInfo oldPi7(oldPR7);
if (oldPi7.exists() && !QFile::exists(newPR7))
- moveFile(oldPR7, m_prefsLocation + "scripter150.rc");
+ migrateFile(oldPR7, m_prefsLocation + "scripter150.rc");
QString oldPR8 = QDir::toNativeSeparators(oldPrefsLocation + "checkfonts.xml");
QString newPR8 = QDir::toNativeSeparators(m_prefsLocation + "checkfonts150.xml");
QFileInfo oldPi8(oldPR8);
if (oldPi8.exists() && !QFile::exists(newPR8))
- moveFile(oldPR8, m_prefsLocation + "checkfonts150.xml");
+ migrateFile(oldPR8, m_prefsLocation + "checkfonts150.xml");
//Move plugin data files to new plugin data file directory
QDir oldPluginData(ScPaths::preferencesDir() + "/plugins");
--
2.54.0 (Apple Git-157)
| ||||
| Patch | Yes | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-10-01 10:22 | jaca101 | New Issue | |
| 2026-10-01 10:22 | jaca101 | File Added: 0003-Prefs-copy-instead-of-move-legacy-prefs-into-a-prefs.patch | |
| 2026-10-01 19:10 | cbradney | Relationship added | has duplicate 0017991 |
| 2026-10-21 20:53 | jghali | Assigned To | => jghali |
| 2026-10-21 20:53 | jghali | Status | new => resolved |
| 2026-10-21 20:53 | jghali | Resolution | open => fixed |
| 2026-10-21 20:53 | jghali | Fixed in Version | => 1.6.7.svn |
| 2026-10-21 20:53 | jghali | Note Added: 0054588 | |
| 2026-10-26 19:27 | cbradney | Status | resolved => closed |