Fixed data loss bug

Fixed a bug which made Dual remove lines that start with a comment in the hosts file.
This commit is contained in:
luca0N! 2021-06-28 15:36:37 -03:00
parent 9d31a39774
commit ce4ef560e2
Signed by: luca0N
GPG Key ID: 2E7B4655CF16D7D6
1 changed files with 5 additions and 2 deletions

View File

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