remove msft temp files

This commit is contained in:
fyears 2024-07-13 16:31:02 +08:00
parent 3c85fff17c
commit 57bdc4d0c6

View File

@ -467,6 +467,21 @@ export const isSpecialFolderNameToSkip = (
return true; return true;
} }
} }
// microsoft tmp files...
const p = x.split("/");
if (p.length > 0) {
const f = p[p.length - 1]; // file name
if (f.startsWith("~$")) {
const suffixList = ["doc", "docx", "ppt", "pptx", "xls", "xlsx"];
for (const suffix of suffixList) {
if (f.endsWith(`.${suffix}`)) {
return true;
}
}
}
}
return false; return false;
}; };