From cc5bde2ca067c8402c4a09a5ff5fa448dcaa7e93 Mon Sep 17 00:00:00 2001
From: Lucas Fernandes Vieira <lucasfv@protonmail.com>
Date: Mon, 10 Dec 2018 14:39:50 -0200
Subject: [PATCH] Fixed a bug when the program would try to validate a disabled
 sync

---
 _about.py     | 4 ++--
 _sync.py      | 4 ++++
 changelog.txt | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/_about.py b/_about.py
index 504f214..52f5f7a 100644
--- a/_about.py
+++ b/_about.py
@@ -5,6 +5,6 @@
 '''
 
 name = "1D-Sync"
-version = "2.5-alpha7"
-build_date = "2018/12/09"
+version = "2.5-alpha8"
+build_date = "2018/12/10"
 codename = "Ghost River"
\ No newline at end of file
diff --git a/_sync.py b/_sync.py
index 72d2aef..cf6019c 100644
--- a/_sync.py
+++ b/_sync.py
@@ -34,6 +34,10 @@ def load(self, log): # loads the sync from its path and validates its values
         if not self.validate_enable(self.properties, log):
             return False
 
+        if not ast.literal_eval(self.properties["enable"]):
+            # will skip validating the file if it is disabled
+            return True
+
         if not self.validate_source_path(self.properties, log):
             return False
 
diff --git a/changelog.txt b/changelog.txt
index eb28bd9..fffb2a8 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -7,6 +7,7 @@
 * All time values are now in the same unit (seconds)
 * Options tied to malfunctions in config.json are now inverted, making them easier to understand while also removing the need to use precedence of options
 * Add option to use a faster but inaccurate comparison technique, it will compare filenames only (like the early versions)
+* Fixed a bug when the program would try to validate a disabled sync, possibly logging the failure multiple times
 
 2.4 - Fear of the Dark
 This release focuses on making selection conditions more versatile by using a logical expression analyzer (a very simple one, don't expect too much) available as a separate project in https://github.com/1deterministic/Simple-Logical-Expression-Analyzer