forked from floraachy/ImageKnife
1.DiskLruCache:fixed an issue where an error occurs when getValue is written to the file path
Signed-off-by: zhoulisheng <635547767@qq.com>
This commit is contained in:
parent
ba4c88e485
commit
1b20f3c219
|
@ -238,7 +238,7 @@ export class DiskLruCache {
|
|||
if (this.fileUtils.exist(path)) {
|
||||
var ab: ArrayBuffer = this.fileUtils.readFilePic(path)
|
||||
this.putCacheMap(key, ab.byteLength)
|
||||
this.fileUtils.writeData(path, 'read ' + key + '\n')
|
||||
this.fileUtils.writeData(this.journalPath, 'read ' + key + '\n')
|
||||
return ab
|
||||
} else {
|
||||
return null;
|
||||
|
@ -260,7 +260,7 @@ export class DiskLruCache {
|
|||
}
|
||||
var path = this.dirPath + key;
|
||||
if (this.fileUtils.exist(path)) {
|
||||
this.fileUtils.writeData(path, 'read ' + key + '\n')
|
||||
this.fileUtils.writeData(this.journalPath, 'read ' + key + '\n')
|
||||
return path
|
||||
} else {
|
||||
return null
|
||||
|
|
Loading…
Reference in New Issue