diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts index 7c60d38543..fd0ca331f0 100644 --- a/packages/frontend/src/os.ts +++ b/packages/frontend/src/os.ts @@ -557,11 +557,12 @@ export async function selectDriveFile(multiple: boolean, excludeSensitive: boole }); } -export async function selectDriveFolder(multiple: boolean): Promise { +export async function selectDriveFolder(multiple: boolean, excludeSensitive: boolean): Promise { return new Promise(resolve => { popup(defineAsyncComponent(() => import('@/components/MkDriveSelectDialog.vue')), { type: 'folder', multiple, + excludeSensitive, }, { done: folders => { if (folders) { diff --git a/packages/frontend/src/scripts/select-file.ts b/packages/frontend/src/scripts/select-file.ts index c2fc3ef7a4..4f4d41456b 100644 --- a/packages/frontend/src/scripts/select-file.ts +++ b/packages/frontend/src/scripts/select-file.ts @@ -90,7 +90,7 @@ function select(src: any, label: string | null, multiple: boolean, excludeSensit title: i18n.ts.cannotSelectSensitiveMedia, text: i18n.ts.cannotSelectSensitiveMediaDescription, }); - rej(); + rej(new Error('Sensitive media is selected')); return; }