projects
/
img2tiles
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
507c23a
)
removing directory path components when creating basename
author
John Tsiombikas
<nuclear@member.fsf.org>
Sun, 17 Feb 2019 14:37:40 +0000
(16:37 +0200)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Sun, 17 Feb 2019 14:37:40 +0000
(16:37 +0200)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index
0474894
..
2f011c9
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-102,6
+102,9
@@
int proc_image(const char *fname)
}
basename = alloca(strlen(fname) + 1);
strcpy(basename, fname);
+ if((suffix = strrchr(basename, '/'))) {
+ basename = suffix;
+ }
if((suffix = strchr(basename, '.'))) {
*suffix = 0;
}