Compare commits

..

1 Commits

Author SHA1 Message Date
luca0N! ce4ef560e2
Fixed data loss bug
Fixed a bug which made Dual remove lines that start with a comment in the hosts file.
2021-06-28 15:36:37 -03:00
1 changed files with 5 additions and 2 deletions

View File

@ -155,9 +155,12 @@ public class Dual {
String line = lines[x]; String line = lines[x];
boolean keepLine = true; boolean keepLine = true;
// Check if this line is a comment. // Check if this line is a comment.
if (line.startsWith("#")) if (line.startsWith("#")){
// Ignore this line. // Ignore this line, but add it to the updatedLines list
// in order to avoid data loss.
updatedLines.add(line);
continue; continue;
}
String[] contents = line.split("#"); String[] contents = line.split("#");
// Check if this line was auto-generated by this program. // Check if this line was auto-generated by this program.