OSDN Git Service
(root)
/
kde
/
kde-extraapps.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa70d4e
)
libktorrent: remove trailing slash in bt::MakeDir()
author
Ivailo Monev
<xakepa10@gmail.com>
Fri, 16 Jul 2021 10:03:28 +0000
(13:03 +0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Fri, 16 Jul 2021 10:03:28 +0000
(13:03 +0300)
fixes directory creation for paths ending with separator
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
libktorrent/src/util/fileops.cpp
patch
|
blob
|
history
diff --git
a/libktorrent/src/util/fileops.cpp
b/libktorrent/src/util/fileops.cpp
index
e126b35
..
08732db
100644
(file)
--- a/
libktorrent/src/util/fileops.cpp
+++ b/
libktorrent/src/util/fileops.cpp
@@
-90,7
+90,11
@@
namespace bt
{
void MakeDir(const QString & dir,bool nothrow)
{
- QDir d(dir);
+ QString nosep = dir;
+ if (nosep.endsWith(bt::DirSeparator())) {
+ nosep.chop(1);
+ }
+ QDir d(nosep);
if (d.exists())
return;