diff --git a/Services/client/src/stores/storage.ts b/Services/client/src/stores/storage.ts index 174346b..e2012d4 100644 --- a/Services/client/src/stores/storage.ts +++ b/Services/client/src/stores/storage.ts @@ -214,12 +214,7 @@ const useStorage = defineStore('storageStore', () => { createdAt: data.createdAt, createdBy: data.createdBy, }) - } else { - error.title = 'ตั้งชื่อ Folder ซ้ำ' - error.msg = '' - error.show() } - folder.value[path].sort((a, b) => a.pathname.localeCompare(b.pathname)) } }, @@ -285,7 +280,7 @@ const useStorage = defineStore('storageStore', () => { ) } - if (currentInfo.path.includes(arr[arr.length - 1])) { + if (currentInfo.path !== path && currentInfo.path.startsWith(path)) { error.title = 'ตำเเหน่งที่คุณอยู่ถูกลบ' error.msg = '' error.show()