fix: on create skip folder for av scan
This commit is contained in:
@@ -478,7 +478,7 @@ export class DocumentsService {
|
|||||||
await updateItemSize(driveItem.parent_id, this.repository, context);
|
await updateItemSize(driveItem.parent_id, this.repository, context);
|
||||||
|
|
||||||
// If AV feature is enabled, scan the file
|
// If AV feature is enabled, scan the file
|
||||||
if (globalResolver.services.av?.avEnabled && version) {
|
if (!driveItem.is_directory && globalResolver.services.av?.avEnabled && version) {
|
||||||
try {
|
try {
|
||||||
driveItem.av_status = await globalResolver.services.av.scanDocument(
|
driveItem.av_status = await globalResolver.services.av.scanDocument(
|
||||||
driveItem,
|
driveItem,
|
||||||
@@ -530,7 +530,7 @@ export class DocumentsService {
|
|||||||
return driveItem;
|
return driveItem;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error({ error: `${error}` }, "Failed to create drive item");
|
this.logger.error({ error: `${error}` }, "Failed to create drive item");
|
||||||
CrudException.throwMe(error, new CrudException("Failed to create item", 500));
|
CrudException.throwMe(error, new CrudException(`Failed to create item ${error}`, 500));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user