瀏覽代碼

do not reset mountflags to default ones when window opens

Armin Schrenk 2 年之前
父節點
當前提交
09d5f71335
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java

+ 4 - 1
src/main/java/org/cryptomator/ui/vaultoptions/MountOptionsController.java

@@ -109,7 +109,10 @@ public class MountOptionsController implements FxController {
 		if (customMountFlagsCheckbox.isSelected()) {
 			readOnlyCheckbox.setSelected(false); // to prevent invalid states
 			mountFlagsField.textProperty().unbind();
-			vaultSettings.mountFlags().set(defaultMountFlags.getValue());
+			var mountFlags = vaultSettings.mountFlags().get();
+			if(mountFlags == null || mountFlags.isBlank()) {
+				vaultSettings.mountFlags().set(defaultMountFlags.getValue());
+			}
 			mountFlagsField.textProperty().bindBidirectional(vaultSettings.mountFlags());
 		} else {
 			mountFlagsField.textProperty().unbindBidirectional(vaultSettings.mountFlags());