Commit ea08a0c6 authored by mercury233's avatar mercury233

temp fix localStorage too big

parent cee72a9b
...@@ -22,7 +22,7 @@ export class AppLocal { ...@@ -22,7 +22,7 @@ export class AppLocal {
toJSON() { toJSON() {
let t: any = {}; let t: any = {};
for (let [k, v] of this.files) { for (let [k, v] of this.files) {
t[k] = v; t[k] = v.substring(0, 10);
} }
return {path: this.path, version: this.version, files: t}; return {path: this.path, version: this.version, files: t};
} }
......
...@@ -562,7 +562,8 @@ export class AppsService { ...@@ -562,7 +562,8 @@ export class AppsService {
for (let [file, checksum] of localFiles!) { for (let [file, checksum] of localFiles!) {
if (latestFiles.has(file)) { if (latestFiles.has(file)) {
let latestChecksum = latestFiles.get(file); let latestChecksum = latestFiles.get(file);
if (!ignoreFiles.has(file) && latestChecksum !== checksum && latestChecksum !== '') { if (!ignoreFiles.has(file) && latestChecksum !== ''
&& latestChecksum.substring(0, 10) !== checksum.substring(0, 10)) {
changedFiles.add(file); changedFiles.add(file);
} else if (latestChecksum === '') { } else if (latestChecksum === '') {
await this.createDirectory(path.join(app.local!.path, file)); await this.createDirectory(path.join(app.local!.path, file));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment