From e2e496c31e2995e220d22f67b3785feaea100d29 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sun, 31 Jan 2021 01:56:06 +0100 Subject: [PATCH] bugfix: update metadata by override gcode file Signed-off-by: Stefan Dej --- src/store/files/mutations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/files/mutations.js b/src/store/files/mutations.js index ce82be3c4..af7890b1d 100644 --- a/src/store/files/mutations.js +++ b/src/store/files/mutations.js @@ -98,7 +98,7 @@ export default { let parent = findDirectory(state.filetree, (payload.item.root+"/"+path).split("/")); if (parent) { - if (parent.findIndex(element => (!element.isDirectory && element.filename === filename)) < 0) { + if (parent.findIndex(element => (!element.isDirectory && element.filename === filename)) === -1) { let modified = new Date(payload.item.modified * 1000); parent.push({ @@ -108,7 +108,7 @@ export default { size: payload.item.size, metadataPulled: false, }); - } + } else Vue.prototype.$socket.sendObj("server.files.metadata", { filename: payload.item.path }, "files/getMetadata") } },