remove colon path limitation.

This commit is contained in:
Miroslav Šedivý
2021-05-20 21:57:28 +02:00
parent f523b94911
commit f2935b998d
2 changed files with 2 additions and 9 deletions
+2 -5
View File
@@ -218,7 +218,7 @@
label="Host path"
:value="host_path"
@input="$set(data.mounts, index, { host_path: $event, container_path })"
:rules="[ rules.absolutePath, rules.withoutColon ]"
:rules="[ rules.absolutePath ]"
autocomplete="off"
></v-text-field>
</v-col>
@@ -228,7 +228,7 @@
label="Container path"
:value="container_path"
@input="$set(data.mounts, index, { host_path, container_path: $event})"
:rules="[ rules.absolutePath, rules.withoutColon ]"
:rules="[ rules.absolutePath ]"
autocomplete="off"
></v-text-field>
</v-col>
@@ -315,9 +315,6 @@ export default class RoomsCreate extends Vue {
},
absolutePath(val: string) {
return val[0] !== "/" ? 'Must be absolute path, starting with /.' : true
},
withoutColon(val: string) {
return val && /:$/.test(val) ? 'Cannnot contain : character.' : true
}
}
-4
View File
@@ -141,10 +141,6 @@ func (s *Room) Set() {
if !filepath.IsAbs(s.InstanceData) {
log.Panic().Msg("invalid `instance.data`, must be an absolute path")
}
if strings.Contains(s.InstanceData, ":") {
log.Panic().Msg("invalid `instance.data`, cannot contain : character")
}
} else {
log.Warn().Msg("missing `instance.data`, container mounts are unavailable")
}