diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2026-01-12 22:48:55 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2026-01-12 22:48:55 +1100 |
| commit | 3bb58e6da8f9bf465e6cd5517c46c4a0667c0e07 (patch) | |
| tree | 49942621f2e8a1acc34f4ca1bb0c2dd8315f394e /plugin | |
| parent | readme: add Discord server link to FAQ section (#1072) (diff) | |
| download | caelestia-shell-3bb58e6da8f9bf465e6cd5517c46c4a0667c0e07.tar.gz caelestia-shell-3bb58e6da8f9bf465e6cd5517c46c4a0667c0e07.tar.bz2 caelestia-shell-3bb58e6da8f9bf465e6cd5517c46c4a0667c0e07.zip | |
plugin/cutils: fix copyfile when overwrite file doesn't exist
Diffstat (limited to '')
| -rw-r--r-- | plugin/src/Caelestia/cutils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/src/Caelestia/cutils.cpp b/plugin/src/Caelestia/cutils.cpp index 0e1778c..6e3bfa9 100644 --- a/plugin/src/Caelestia/cutils.cpp +++ b/plugin/src/Caelestia/cutils.cpp @@ -100,7 +100,7 @@ bool CUtils::copyFile(const QUrl& source, const QUrl& target, bool overwrite) co return false; } - if (overwrite) { + if (overwrite && QFile::exists(target.toLocalFile())) { if (!QFile::remove(target.toLocalFile())) { qWarning() << "CUtils::copyFile: overwrite was specified but failed to remove" << target.toLocalFile(); return false; |