Skip to content

Commit

Permalink
fix: create folders with spaces in the name (#942)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored Jul 3, 2022
1 parent eb1d3c1 commit 1e0645b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/components/panels/GcodefilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@
ref="inputFieldCreateDirectory"
v-model="dialogCreateDirectory.name"
:label="$t('Files.Name')"
:rules="input_rules"
required
@keypress.enter="createDirectoryAction"></v-text-field>
</v-card-text>
Expand Down Expand Up @@ -712,8 +711,6 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
private deleteSelectedDialog = false
private input_rules = [(value: string) => value.indexOf(' ') === -1 || 'Name contains spaces!']
get currentPath() {
const path = this.$store.state.gui.view.gcodefiles.currentPath
if (path === 'gcodes') return ''
Expand Down Expand Up @@ -1051,7 +1048,7 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
}
createDirectoryAction() {
if (this.dialogCreateDirectory.name.length && this.dialogCreateDirectory.name.indexOf(' ') === -1) {
if (this.dialogCreateDirectory.name.length) {
this.dialogCreateDirectory.show = false
this.$socket.emit(
'server.files.post_directory',
Expand Down

0 comments on commit 1e0645b

Please sign in to comment.