Commit 464dde96 authored by Franz Baumgärtner's avatar Franz Baumgärtner Committed by Nate Graham
Browse files

Fix inability to Drag+Drop screenshot due to subfolder in filename

Summary:
Fixes the mentioned bug by creating all necessary subdirectories.

BUG: 417722

Test Plan:
1. Set save Filename in Spectacle to one including one or more `/`, thus including subdirectories. Example: `%Y/%M/screen-%2d`
2. Take a screenshot
3. Start dragging the preview

Reviewers: #spectacle, davidre, ngraham

Reviewed By: #spectacle, davidre, ngraham

Subscribers: ngraham, davidre, #spectacle

Tags: #spectacle

Differential Revision: https://phabricator.kde.org/D28702
parent 53be49b0
......@@ -394,7 +394,8 @@ QUrl ExportManager::tempSave()
// supports the use-case of creating multiple screenshots in a row
// and exporting them to the same destination e.g. via clipboard,
// where the temp file name is used as filename suggestion
const QString baseFileName = mTempDir->path() + QDir::separator() + makeAutosaveFilename();
const QString baseFileName = mTempDir->path() + QLatin1Char('/') +
QUrl::fromLocalFile(makeAutosaveFilename()).fileName();
QString mimetype = makeSaveMimetype(QUrl(baseFileName));
const QString fileName = autoIncrementFilename(baseFileName, mimetype,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment