Skip to content

Commit

Permalink
fix: hot fix, replace repoID by repoId
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Apr 26, 2024
1 parent a9fefcc commit b0fa5e6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions public/script/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ angular
current = current[0].child;
}
name = test;
if (size > 0) {
if (size >= 0) {
dir = false;
}
}
if (size) {
if (size != null) {
size = `Size: ${humanFileSize(size || 0)}`;
} else {
size = "";
Expand Down
2 changes: 1 addition & 1 deletion public/script/bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/core/Repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export default class Repository {
}
// remove cache
await Promise.all([
FileModel.deleteMany({ repoID: this.repoId }).exec(),
FileModel.deleteMany({ repoId: this.repoId }).exec(),
this.removeCache(),
]);
console.log(`[RESET] ${this._model.repoId} has been reset`);
Expand Down
6 changes: 2 additions & 4 deletions src/core/storage/FileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ export default class FileSystem extends StorageBase {
try {
const stats = await fs.promises.stat(filePath);
if (stats.isDirectory()) {
output2.push(
new FileModel({ name: file, path: dir, repoID: repoId })
);
output2.push(new FileModel({ name: file, path: dir, repoId }));
output2.push(
...(await this.listFiles(repoId, join(dir, file), opt))
);
Expand All @@ -169,7 +167,7 @@ export default class FileSystem extends StorageBase {
new FileModel({
name: file,
path: dir,
repoID: repoId,
repoId: repoId,
size: stats.size,
sha: stats.ino.toString(),
})
Expand Down
2 changes: 1 addition & 1 deletion src/core/storage/S3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export default class S3Storage extends StorageBase {
new FileModel({
name: basename(f.Key),
path: dirname(f.Key),
repoID: repoId,
repoId,
size: f.Size,
sha: f.ETag,
})
Expand Down

0 comments on commit b0fa5e6

Please sign in to comment.