mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-06-12 10:27:49 +02:00
fix: hot fix, replace repoID by repoId
This commit is contained in:
@@ -331,11 +331,11 @@ angular
|
|||||||
current = current[0].child;
|
current = current[0].child;
|
||||||
}
|
}
|
||||||
name = test;
|
name = test;
|
||||||
if (size > 0) {
|
if (size >= 0) {
|
||||||
dir = false;
|
dir = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (size) {
|
if (size != null) {
|
||||||
size = `Size: ${humanFileSize(size || 0)}`;
|
size = `Size: ${humanFileSize(size || 0)}`;
|
||||||
} else {
|
} else {
|
||||||
size = "";
|
size = "";
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -485,7 +485,7 @@ export default class Repository {
|
|||||||
}
|
}
|
||||||
// remove cache
|
// remove cache
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
FileModel.deleteMany({ repoID: this.repoId }).exec(),
|
FileModel.deleteMany({ repoId: this.repoId }).exec(),
|
||||||
this.removeCache(),
|
this.removeCache(),
|
||||||
]);
|
]);
|
||||||
console.log(`[RESET] ${this._model.repoId} has been reset`);
|
console.log(`[RESET] ${this._model.repoId} has been reset`);
|
||||||
|
|||||||
@@ -152,9 +152,7 @@ export default class FileSystem extends StorageBase {
|
|||||||
try {
|
try {
|
||||||
const stats = await fs.promises.stat(filePath);
|
const stats = await fs.promises.stat(filePath);
|
||||||
if (stats.isDirectory()) {
|
if (stats.isDirectory()) {
|
||||||
output2.push(
|
output2.push(new FileModel({ name: file, path: dir, repoId }));
|
||||||
new FileModel({ name: file, path: dir, repoID: repoId })
|
|
||||||
);
|
|
||||||
output2.push(
|
output2.push(
|
||||||
...(await this.listFiles(repoId, join(dir, file), opt))
|
...(await this.listFiles(repoId, join(dir, file), opt))
|
||||||
);
|
);
|
||||||
@@ -169,7 +167,7 @@ export default class FileSystem extends StorageBase {
|
|||||||
new FileModel({
|
new FileModel({
|
||||||
name: file,
|
name: file,
|
||||||
path: dir,
|
path: dir,
|
||||||
repoID: repoId,
|
repoId: repoId,
|
||||||
size: stats.size,
|
size: stats.size,
|
||||||
sha: stats.ino.toString(),
|
sha: stats.ino.toString(),
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ export default class S3Storage extends StorageBase {
|
|||||||
new FileModel({
|
new FileModel({
|
||||||
name: basename(f.Key),
|
name: basename(f.Key),
|
||||||
path: dirname(f.Key),
|
path: dirname(f.Key),
|
||||||
repoID: repoId,
|
repoId,
|
||||||
size: f.Size,
|
size: f.Size,
|
||||||
sha: f.ETag,
|
sha: f.ETag,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user