projects
/
platform
/
upstream
/
flac.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc190e8
)
fix problem with filename parsing if file does not have extension but also has a...
author
Josh Coalson
<jcoalson@users.sourceforce.net>
Fri, 10 Nov 2006 17:42:55 +0000
(17:42 +0000)
committer
Josh Coalson
<jcoalson@users.sourceforce.net>
Fri, 10 Nov 2006 17:42:55 +0000
(17:42 +0000)
src/flac/main.c
patch
|
blob
|
history
diff --git
a/src/flac/main.c
b/src/flac/main.c
index 8f6c6c4d06de79ab4b4f21cc7ed836f1b64f7c4f..48364e59d7271fccf758d607bb5a92fa597e9524 100644
(file)
--- a/
src/flac/main.c
+++ b/
src/flac/main.c
@@
-1905,7
+1905,8
@@
const char *get_outfilename(const char *infilename, const char *suffix)
return 0;
if (flac__strlcat(buffer, infilename, sizeof buffer) >= sizeof buffer)
return 0;
- if(0 == (p = strrchr(buffer, '.'))) {
+ /* the . must come after any / to avoid problems with, e.g. "some.directory/extensionless-filename" */
+ if(0 == (p = strrchr(buffer, '.')) || strchr(p, '/')) {
if (flac__strlcat(buffer, suffix, sizeof buffer) >= sizeof buffer)
return 0;
}