Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
5be11ad9
Commit
5be11ad9
authored
Feb 14, 2021
by
Méven Car
Committed by
Christoph Cullmann
Mar 05, 2021
Browse files
Avoid errors like 'QDir::mkdir: Empty or null file name'
parent
04d5e019
Changes
1
Hide whitespace changes
Inline
Side-by-side
kate/katedocmanager.cpp
View file @
5be11ad9
...
...
@@ -416,12 +416,16 @@ void KateDocManager::saveDocumentList(KConfig *config)
// prepare stash directory
const
QString
appDataPath
=
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppDataLocation
);
const
QString
sessionName
=
KateApp
::
self
()
->
sessionManager
()
->
activeSession
()
->
name
();
QDir
dir
(
appDataPath
);
dir
.
mkdir
(
QStringLiteral
(
"stash"
));
dir
.
cd
(
QStringLiteral
(
"stash"
));
dir
.
mkdir
(
sessionName
);
dir
.
cd
(
sessionName
);
const
auto
session
=
KateApp
::
self
()
->
sessionManager
()
->
activeSession
();
if
(
session
)
{
const
QString
sessionName
=
session
->
name
();
dir
.
mkdir
(
sessionName
);
dir
.
cd
(
sessionName
);
}
int
i
=
0
;
for
(
KTextEditor
::
Document
*
doc
:
qAsConst
(
m_docList
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment