mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-04-04 22:39:10 +00:00
Add better save path verification
This commit is contained in:
@@ -55,10 +55,11 @@ QString Screenshot::graphicalSave(const QRect &selection) const {
|
||||
|
||||
QSettings settings;
|
||||
QString savePath = settings.value("savePath").toString();
|
||||
if (savePath.isEmpty()) {
|
||||
if (savePath.isEmpty() || !QDir(savePath).exists()) {
|
||||
savePath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
|
||||
if (savePath.isEmpty())
|
||||
if (savePath.isEmpty()) {
|
||||
savePath = QDir::currentPath();
|
||||
}
|
||||
}
|
||||
// find unused name adding _n where n is a number
|
||||
QString tempName = QObject::tr("/screenshot");
|
||||
|
||||
Reference in New Issue
Block a user