From c9dbdb219f099b6ac066513e783f4788501953de Mon Sep 17 00:00:00 2001 From: Bionus Date: Sun, 29 Jul 2018 13:55:56 +0200 Subject: [PATCH] Log errno when failing to set file mod time on unix --- gui/src/helpers.cpp | 3 +-- lib/src/functions.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gui/src/helpers.cpp b/gui/src/helpers.cpp index 01e07af31..97da83669 100644 --- a/gui/src/helpers.cpp +++ b/gui/src/helpers.cpp @@ -34,7 +34,6 @@ void showInGraphicalShell(const QString &pathIn) param += QDir::toNativeSeparators(pathIn); QProcess::startDetached("explorer.exe "+param); #elif defined(Q_OS_MAC) - // Q_UNUSED(parent) QStringList scriptArgs; scriptArgs << QLatin1String("-e") << QString::fromLatin1("tell application \"Finder\" to reveal POSIX file \"%1\"").arg(pathIn); QProcess::execute(QLatin1String("/usr/bin/osascript"), scriptArgs); @@ -42,7 +41,7 @@ void showInGraphicalShell(const QString &pathIn) scriptArgs << QLatin1String("-e") << QLatin1String("tell application \"Finder\" to activate"); QProcess::execute("/usr/bin/osascript", scriptArgs); #else - QDesktopServices::openUrl(QUrl("file:///"+pathIn)); + QDesktopServices::openUrl(QUrl("file:///" + pathIn)); #endif } diff --git a/lib/src/functions.cpp b/lib/src/functions.cpp index dcbcaa4f1..5bda25550 100644 --- a/lib/src/functions.cpp +++ b/lib/src/functions.cpp @@ -358,7 +358,7 @@ bool setFileCreationDate(const QString &path, const QDateTime &datetime) const char *filename = path.toStdString().c_str(); if ((utime(filename, &timebuffer)) < 0) { - // log(QStringLiteral("Unable to change the file creation date (%1): %2").arg(errno).arg(path), Logger::Error); + log(QStringLiteral("Unable to change the file creation date (%1): %2").arg(errno).arg(path), Logger::Error); return false; } #endif