OSDN Git Service
(root)
/
winmerge-jp
/
winmerge-jp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cf4f5d
)
paths_FindFileName(): return the folder name if passing the path with trailing slash
author
sdottaka
<none@none>
Sat, 6 Jul 2013 05:14:44 +0000
(14:14 +0900)
committer
sdottaka
<none@none>
Sat, 6 Jul 2013 05:14:44 +0000
(14:14 +0900)
Src/paths.cpp
patch
|
blob
|
history
diff --git
a/Src/paths.cpp
b/Src/paths.cpp
index
3c2e0f7
..
16e5e4f
100644
(file)
--- a/
Src/paths.cpp
+++ b/
Src/paths.cpp
@@
-97,7
+97,11
@@
String paths_FindFileName(const String& path)
{
const TCHAR *filename = path.c_str();
while (const TCHAR *slash = _tcspbrk(filename, _T("\\/")))
+ {
+ if (*(slash + 1) == '\0')
+ break;
filename = slash + 1;
+ }
return filename;
}