From 6f02d72df270d713c08a1904aa98f2b4807341e1 Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 7 Apr 2018 21:13:39 +0200 Subject: [PATCH] Prevent computer name / host name from being deleted between sessions. For details, see https://www.sheepit-renderfarm.com/forum/viewtopic.php?f=9&t=1010 --- .../sheepit/client/standalone/swing/activity/Settings.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/sheepit/client/standalone/swing/activity/Settings.java b/src/com/sheepit/client/standalone/swing/activity/Settings.java index 51b7ff3..e3c406f 100644 --- a/src/com/sheepit/client/standalone/swing/activity/Settings.java +++ b/src/com/sheepit/client/standalone/swing/activity/Settings.java @@ -611,9 +611,9 @@ public class Settings implements Activity { cachePath = config.getStorageDir().getAbsolutePath(); } - String hostnameText = null; - if (hostname.getText() != null && hostname.getText().equals(parent.getConfiguration().getHostname()) == false) { - hostnameText = hostname.getText(); + String hostnameText = hostname.getText(); + if (hostnameText == null || hostnameText.isEmpty()) { + hostnameText = parent.getConfiguration().getHostname(); } if (saveFile.isSelected()) {