fix: edit files/gcodes in subfolders (#803)

fixes #801
This commit is contained in:
Stefan Dej
2022-05-13 14:50:39 +02:00
committed by GitHub
parent eadf2e1527
commit 8ddf13081f
2 changed files with 2 additions and 2 deletions

View File

@@ -253,7 +253,7 @@ export default class TheEditor extends Mixins(BaseMixin) {
}
get title() {
const title = `${this.filepath}/${this.filename}`
const title = this.filepath ? `${this.filepath}/${this.filename}` : this.filename
if (!this.isWriteable) return `${title} (${this.$t('Editor.FileReadOnly')})`

View File

@@ -93,7 +93,7 @@ export const actions: ActionTree<EditorState, RootState> = {
const formData = new FormData()
formData.append('file', content, state.filename)
formData.append('root', state.fileroot)
formData.append('path', state.filepath.slice(1))
formData.append('path', state.filepath)
formData.append('checksum', sha256(payload.content))
const url = rootGetters['socket/getUrl'] + '/server/files/upload'