Skip to content

Commit

Permalink
fix: remove moved paths from data store
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas committed Sep 30, 2023
1 parent 3dd3079 commit ba830f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/store/files/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const actions: ActionTree<FilesState, RootState> = {
}
},

async notifyMoveDir (_, payload: FileChangeSocketResponse) {
async notifyMoveDir ({ commit }, payload: FileChangeSocketResponse) {
const root = payload.item.root
const itemPaths = getFilePaths(payload.item.path, root)

Expand All @@ -138,6 +138,8 @@ export const actions: ActionTree<FilesState, RootState> = {
const sourcePaths = getFilePaths(payload.source_item.path, root)
if (itemPaths.rootPath !== sourcePaths.rootPath) {
SocketActions.serverFilesGetDirectory(root, sourcePaths.rootPath)

commit('setPathDelete', { path: `${sourcePaths.rootPath}/${sourcePaths.filename}`, root })
}
}
},
Expand Down

0 comments on commit ba830f1

Please sign in to comment.