diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-12-19 05:51:01 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-12-19 05:51:01 +0000 |
commit | 86e94f4ac956e0aed23de30c7a458d215f54749a (patch) | |
tree | 7fcfdcc62c3319ffd669b18b080d40c9c5897210 /source/common/adfile.c | |
parent | de06c6b7e0851b337ee530b0ab8818f4216b06b2 (diff) |
Notes
Diffstat (limited to 'source/common/adfile.c')
-rw-r--r-- | source/common/adfile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/common/adfile.c b/source/common/adfile.c index dd5abee39849f..27271eeccca80 100644 --- a/source/common/adfile.c +++ b/source/common/adfile.c @@ -199,6 +199,7 @@ FlGenerateFilename ( { char *Position; char *NewFilename; + char *DirectoryPosition; /* @@ -211,8 +212,10 @@ FlGenerateFilename ( /* Try to find the last dot in the filename */ + DirectoryPosition = strrchr (NewFilename, '/'); Position = strrchr (NewFilename, '.'); - if (Position) + + if (Position && (Position > DirectoryPosition)) { /* Tack on the new suffix */ |