Don't try and clear file if it\'s unexistent
This commit is contained in:
parent
24952bba05
commit
00cbbd4938
@ -146,7 +146,7 @@ void utils::externalScreenshot(std::function<void(QPixmap)> callback) {
|
||||
pixmap.loadFromData(process->readAllStandardOutput());
|
||||
callback(pixmap);
|
||||
}
|
||||
QFile(tempPath).remove();
|
||||
if (!tempPath.isEmpty()) QFile(tempPath).remove();
|
||||
});
|
||||
QObject::connect(process, &QProcess::errorOccurred, [](QProcess::ProcessError err) {
|
||||
if (err == QProcess::FailedToStart) settings::settings().remove("command/fullscreenCommand");
|
||||
@ -178,7 +178,7 @@ void utils::externalScreenshotActive(std::function<void(QPixmap)> callback) {
|
||||
pixmap.loadFromData(process->readAllStandardOutput());
|
||||
callback(pixmap);
|
||||
}
|
||||
QFile(tempPath).remove();
|
||||
if (!tempPath.isEmpty()) QFile(tempPath).remove();
|
||||
});
|
||||
QObject::connect(process, &QProcess::errorOccurred, [](QProcess::ProcessError err) {
|
||||
if (err == QProcess::FailedToStart) settings::settings().remove("command/activeCommand");
|
||||
|
Loading…
Reference in New Issue
Block a user