diff --git a/apps/files_external/src/settings.js b/apps/files_external/src/settings.js index 033696c9d24..80cc3b200f0 100644 --- a/apps/files_external/src/settings.js +++ b/apps/files_external/src/settings.js @@ -554,6 +554,8 @@ MountOptionsDropdown.prototype = { this.setOptions(mountOptions, visibleOptions, storage) this.$el.appendTo($container) + + this._initialOptions = JSON.stringify(this.getOptions()) MountOptionsDropdown._last = this this.$el.trigger('show') @@ -1455,11 +1457,14 @@ MountConfigListView.prototype = _.extend({ }) dropDown.$el.on('hide', function() { - const mountOptions = dropDown.getOptions() + const newOptions = dropDown.getOptions() + const newOptionsStr = JSON.stringify(newOptions) $('body').off('mouseup.mountOptionsDropdown') - $tr.find('input.mountOptions').val(JSON.stringify(mountOptions)) $tr.find('td.mountOptionsToggle>.icon-more').attr('aria-expanded', 'false') - self.saveStorageConfig($tr) + if (dropDown._initialOptions !== newOptionsStr) { + $tr.find('input.mountOptions').val(newOptionsStr) + self.saveStorageConfig($tr) + } }) }, }, OC.Backbone.Events)