Skip to content

Commit

Permalink
Allow long filenames for BFT
Browse files Browse the repository at this point in the history
  • Loading branch information
benlye committed Nov 10, 2022
1 parent b7337b8 commit 160ed60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions octoprint_firmwareupdater/static/js/firmwareupdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ $(function() {
}

if (self.getProfileSetting("flash_method") == "marlinbft" && self.getProfileSetting("marlinbft_use_custom_filename") && !self.checkMarlinBftCustomFileName()) {
alert = gettext("The target filename is invalid. Filename must be 8dot3 format.");
alert = gettext("The target filename is invalid.");
}

if (!self.flashPort() &! self.getProfileSetting("flash_method") == "dfuprogrammer") {
Expand Down Expand Up @@ -1326,7 +1326,7 @@ $(function() {

self.checkMarlinBftCustomFileName = function() {
var filename = self.getProfileSetting("marlinbft_custom_filename")
var filenamePattern = new RegExp("^[A-z0-9_-]{1,8}\\.[A-z0-9]{1,3}$");
var filenamePattern = new RegExp("^[A-z0-9_-]{1,}\\.[A-z0-9]{1,3}$");
return filenamePattern.test(filename);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@
<input type="text" class="input-block-level" data-bind='value: configMarlinBftCustomFilename, enable: configMarlinBftUseCustomFilename, valueUpdate: "afterkeydown"'>
<button class="btn" type="button" data-bind="click: resetMarlinBftCustomFilename, enable: configMarlinBftUseCustomFilename">{{ _('Reset') }}</button>
</div>
<span class="help-block">{{ _('Firmware file will be saved on the printer using the specified name. Filename must be in <a href=https://en.wikipedia.org/wiki/8.3_filename>8dot3 format</a> (up 8 character name, up to 3 character extension).') }}</span>
<span class="help-block">{{ _('Firmware file will be saved on the printer using the specified name.') }}</span>
</div>
</div>
</div>
Expand Down

0 comments on commit 160ed60

Please sign in to comment.