Skip to content

Commit 15467ba

Browse files
@jotadevelopersergiohgz
authored andcommitted
fix: return time as milliseconds
1 parent d9ed04a commit 15467ba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugins/local-storage/src/local-database.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class LocalDatabase implements IPluginStorage {
6161
search(onPackage: Callback, onEnd: Callback, validateName: any): void {
6262
const storages = this._getCustomPackageLocalStorages();
6363
const base = Path.dirname(this.config.self_path);
64+
const self = this;
6465
async.eachSeries(
6566
Object.keys(storages),
6667
function(storage, cb) {
@@ -113,7 +114,7 @@ class LocalDatabase implements IPluginStorage {
113114
{
114115
name: file,
115116
path: packagePath,
116-
time: stats.mtime.getTime()
117+
time: self._getTime(stats.mtime.getTime(), stats.mtime)
117118
},
118119
cb
119120
);
@@ -130,6 +131,10 @@ class LocalDatabase implements IPluginStorage {
130131
);
131132
}
132133

134+
_getTime(time: number, mtime: number) {
135+
return time ? time : mtime;
136+
}
137+
133138
_getCustomPackageLocalStorages() {
134139
const storages = {};
135140

0 commit comments

Comments
 (0)