🐛 Fix AV warning for files uploaded before enabling av (#746)

This commit is contained in:
Montassar Ghanmy
2024-11-26 16:58:35 +01:00
committed by GitHub
parent 8f8586fdac
commit 9fefe931fb
2 changed files with 4 additions and 3 deletions
@@ -8,8 +8,8 @@ import * as UUIDTools from "../../../utils/uuid";
export const TYPE = "drive_files";
export type DriveScope = "personal" | "shared";
export type AVStatusSafe = "safe";
export type AVStatusUnsafe = "uploaded" | "scanning" | "scan_failed" | "malicious" | "skipped";
export type AVStatusSafe = "uploaded" | "safe";
export type AVStatusUnsafe = "scanning" | "scan_failed" | "malicious" | "skipped";
export type AVStatus = AVStatusSafe | AVStatusUnsafe;
/**
@@ -1119,7 +1119,8 @@ export class DocumentsService {
// Check files in the current directory
const maliciousFiles = entities.filter(
child => !child.is_directory && child.av_status !== "safe",
child =>
!child.is_directory && child.av_status && !["uploaded", "safe"].includes(child.av_status),
);
if (maliciousFiles.length > 0) {