diff options
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 dd5abee..27271ee 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 */ |