mirror of
https://github.com/brunodev85/winlator.git
synced 2026-10-22 22:12:11 +03:00
Merge pull request #57 from Kashinathpat/bug-fix
Fix: Handle Spaces in Environment Variable Names and Values
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -387,7 +387,7 @@ public class ContainerDetailFragment extends Fragment {
|
||||
for (int i = 0; i < parent.getChildCount(); i++) {
|
||||
View child = parent.getChildAt(i);
|
||||
String name = ((TextView)child.findViewById(R.id.TextView)).getText().toString();
|
||||
String value = ((EditText)child.findViewById(R.id.EditText)).getText().toString().trim();
|
||||
String value = ((EditText)child.findViewById(R.id.EditText)).getText().toString().trim().replace(" ", "");
|
||||
if (!value.isEmpty()) envVars.put(name, value);
|
||||
}
|
||||
return envVars.toString();
|
||||
|
||||
@@ -21,8 +21,8 @@ public class AddEnvVarDialog extends ContentDialog {
|
||||
setIcon(R.drawable.icon_env_var);
|
||||
|
||||
setOnConfirmCallback(() -> {
|
||||
String name = etName.getText().toString().trim();
|
||||
String value = etValue.getText().toString().trim();
|
||||
String name = etName.getText().toString().trim().replace(" ", "");
|
||||
String value = etValue.getText().toString().trim().replace(" ", "");
|
||||
|
||||
if (!name.isEmpty() && !value.isEmpty()) {
|
||||
LinearLayout parent = container.findViewById(R.id.LLEnvVars);
|
||||
|
||||
Reference in new issue
Block a user