fix: preserve and anonymize truncated folder warnings

This commit is contained in:
tdurieux
2026-09-06 09:18:28 +02:00
parent 8d2921b406
commit 4643e9f838
3 changed files with 19 additions and 3 deletions
+3 -2
View File
@@ -163,11 +163,12 @@ export default class Repository {
}
if (!hasFile || opt.force) {
await FileModel.deleteMany({ repoId: this.repoId }).exec();
const files = await this.source.getFiles(opt.progress);
const source = this.source;
const files = await source.getFiles(opt.progress);
files.forEach((f) => (f.repoId = this.repoId));
await FileModel.insertMany(files);
const sourceWithTruncation = this.source as unknown as {
const sourceWithTruncation = source as unknown as {
truncatedFolderList?: string[];
};
if (Array.isArray(sourceWithTruncation.truncatedFolderList)) {