Skip to content

Commit edd5956

Browse files
committed
Apply fix to #254
1 parent 71d6fb4 commit edd5956

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/fs.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,10 @@ function stat(path:string):Promise<RNFetchBlobFile> {
201201
if(err)
202202
reject(new Error(err))
203203
else {
204-
if(stat)
204+
if(stat) {
205+
stat.size = parseInt(stat.size)
205206
stat.lastModified = parseInt(stat.lastModified)
207+
}
206208
resolve(stat)
207209
}
208210
})

src/ios/RNFetchBlobFS.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ + (NSDictionary *) stat:(NSString *) path error:(NSError **) error {
516516
@"size" : size,
517517
@"filename" : filename,
518518
@"path" : path,
519-
@"lastModified" : [NSNumber numberWithLong:(time_t) [lastModified timeIntervalSince1970]*1000],
519+
@"lastModified" : [NSString stringWithFormat:@"%@", [NSNumber numberWithLong:(time_t) [lastModified timeIntervalSince1970]*1000]],
520520
@"type" : isDir ? @"directory" : @"file"
521521
};
522522

0 commit comments

Comments
 (0)