diff --git a/Services/client/src/stores/storage.ts b/Services/client/src/stores/storage.ts index 3059a98..d63b7e4 100644 --- a/Services/client/src/stores/storage.ts +++ b/Services/client/src/stores/storage.ts @@ -281,13 +281,14 @@ const useStorage = defineStore('storageStore', () => { } if ( - currentInfo.path !== consistantPath(arr) && - currentInfo.path.length > consistantPath(arr).length && + currentInfo.path.length >= consistantPath(arr).length && currentInfo.path.startsWith(consistantPath(arr)) ) { - error.title = 'แจ้งเตือน' - error.msg = 'ข้อมูลที่คุณกำลังเข้าถึงอยู่ถูกลบ' - error.show() + error.set({ + title: 'แจ้งเตือน', + msg: 'ข้อมูลที่คุณกำลังเข้าถึงอยู่ถูกลบ', + }) + goto() } }) socket.on('FileUpload', (data: StorageFile) => {