diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-10-01 22:35:52 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-10-01 22:35:52 +1000 |
| commit | 11dc993f4b54631c88c655f1fe5f3caea0e96605 (patch) | |
| tree | 6f8e799f403edc453cdd96bf4ae18553930e0e2e /plugin/src/Caelestia | |
| parent | notifs: clear actually close notifs (diff) | |
| download | caelestia-shell-11dc993f4b54631c88c655f1fe5f3caea0e96605.tar.gz caelestia-shell-11dc993f4b54631c88c655f1fe5f3caea0e96605.tar.bz2 caelestia-shell-11dc993f4b54631c88c655f1fe5f3caea0e96605.zip | |
plugin/cutils: warn on overwrite fail
Diffstat (limited to 'plugin/src/Caelestia')
| -rw-r--r-- | plugin/src/Caelestia/cutils.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugin/src/Caelestia/cutils.cpp b/plugin/src/Caelestia/cutils.cpp index 27074ee..0e1778c 100644 --- a/plugin/src/Caelestia/cutils.cpp +++ b/plugin/src/Caelestia/cutils.cpp @@ -101,7 +101,10 @@ bool CUtils::copyFile(const QUrl& source, const QUrl& target, bool overwrite) co } if (overwrite) { - QFile::remove(target.toLocalFile()); + if (!QFile::remove(target.toLocalFile())) { + qWarning() << "CUtils::copyFile: overwrite was specified but failed to remove" << target.toLocalFile(); + return false; + } } return QFile::copy(source.toLocalFile(), target.toLocalFile()); |