diff --git a/app/src/main/java/com/winlator/container/Shortcut.java b/app/src/main/java/com/winlator/container/Shortcut.java index ae5bcfde..8a26b4ec 100644 --- a/app/src/main/java/com/winlator/container/Shortcut.java +++ b/app/src/main/java/com/winlator/container/Shortcut.java @@ -36,9 +36,10 @@ public Shortcut(Container container, File file) { int index; for (String line : FileUtils.readLines(file)) { - index = line.indexOf("["); - if (index != -1) { - section = line.substring(index+1, line.indexOf("]", index)); + line = line.trim(); + if (line.isEmpty() || line.startsWith("#")) continue; // Skip empty lines and comments + if (line.startsWith("[")) { + section = line.substring(1, line.indexOf("]")); } else { index = line.indexOf("=");