File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -96,15 +96,15 @@ class FileRotator extends EventEmitter {
96
96
97
97
_getFileName ( number , gzip ) {
98
98
const parsedPath = path . parse ( this . _path ) ;
99
- let base = `${ parsedPath . name } .${ String ( number ) } ${ parsedPath . ext } ` ;
99
+ let base = `${ parsedPath . name } .${ String ( number - 1 ) } ${ parsedPath . ext } ` ;
100
100
if ( number === 0 ) {
101
101
base = parsedPath . name
102
102
. replace ( '.%N' , '' )
103
103
. replace ( '_%N' , '' )
104
104
. replace ( '-%N' , '' )
105
105
. replace ( '%N' , '' ) + parsedPath . ext ;
106
106
} else if ( parsedPath . name . indexOf ( '%N' ) >= 0 ) {
107
- base = parsedPath . name . replace ( '%N' , String ( number ) ) + parsedPath . ext ;
107
+ base = parsedPath . name . replace ( '%N' , String ( number - 1 ) ) + parsedPath . ext ;
108
108
}
109
109
110
110
const isGzip = this . _gzip && gzip ;
You can’t perform that action at this time.
0 commit comments