Skip to content

Commit

Permalink
Merge pull request lxc-webpanel#75 from mohlerm/master
Browse files Browse the repository at this point in the history
Fixed directories containing a dot not getting accepted as rootfs directory
  • Loading branch information
ElieDeloumeau committed Sep 17, 2014
2 parents e60bc9e + 73a51ca commit 38fbddf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lwp.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def edit(container=None):
flash(u'CPU shares updated for %s!' % container, 'success')

if form['rootfs'] != cfg['rootfs'] and \
re.match('^[a-zA-Z0-9_/\-]+', form['rootfs']):
re.match('^[a-zA-Z0-9_/\-\.]+', form['rootfs']):
lwp.push_config_value('lxc.rootfs', form['rootfs'],
container=container)
flash(u'Rootfs updated!' % container, 'success')
Expand Down
4 changes: 2 additions & 2 deletions templates/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h3 class="head">{{ container|capitalize }}</small>
<div class="control-group">
<label class="control-label" for="inputRootfs">Root FS</label>
<div class="controls">
<input pattern="[a-zA-Z0-9_/\-]+" type="text" id="inputRootfs" name="rootfs" value="{{ settings.rootfs }}">
<input pattern="[a-zA-Z0-9_/\-\.]+" type="text" id="inputRootfs" name="rootfs" value="{{ settings.rootfs }}">
<span class="help-inline"><small>(e.g /var/lib/lxc/{{container}}/rootfs)</small></span>
</div>
</div>
Expand Down Expand Up @@ -193,4 +193,4 @@ <h3 class="head">{{ container|capitalize }}</small>
$('#' + elem).val(value);
};
</script>
{% endblock %}
{% endblock %}

0 comments on commit 38fbddf

Please sign in to comment.