Not hiding the special files in the cache.
They are still distinguished from the result files because their names don't contain a hyphen, which all the result files have.
This commit is contained in:
parent
17516cd831
commit
20a2f2d401
2 changed files with 4 additions and 4 deletions
6
vigil
6
vigil
|
|
@ -473,7 +473,7 @@ class Log:
|
|||
|
||||
GREY_BOLD_STYLE = termstr.CharStyle(termstr.Color.grey_100, is_bold=True)
|
||||
GREEN_STYLE = termstr.CharStyle(termstr.Color.green)
|
||||
LOG_PATH = os.path.join(_CACHE_PATH, ".log")
|
||||
LOG_PATH = os.path.join(_CACHE_PATH, "log")
|
||||
|
||||
def __init__(self, appearance_changed_event):
|
||||
self._appearance_changed_event = appearance_changed_event
|
||||
|
|
@ -895,7 +895,7 @@ def main(root_path, is_being_tested=False):
|
|||
jobs_added_event = threading.Event()
|
||||
appearance_changed_event = threading.Event()
|
||||
try:
|
||||
pickle_path = os.path.join(_CACHE_PATH, ".summary.pickle")
|
||||
pickle_path = os.path.join(_CACHE_PATH, "summary.pickle")
|
||||
with gzip.open(pickle_path, "rb") as file_:
|
||||
screen = pickle.load(file_)
|
||||
except FileNotFoundError:
|
||||
|
|
@ -991,7 +991,7 @@ def chdir(path):
|
|||
|
||||
def manage_cache(root_path):
|
||||
cache_path = os.path.join(root_path, _CACHE_PATH)
|
||||
timestamp_path = os.path.join(cache_path, ".creation-time")
|
||||
timestamp_path = os.path.join(cache_path, "creation_time")
|
||||
if os.path.exists(cache_path) and \
|
||||
os.stat(__file__).st_mtime > os.stat(timestamp_path).st_mtime:
|
||||
print("Vigil has been updated, so clearing the cache and"
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ class MainTestCase(unittest.TestCase):
|
|||
with vigil.chdir(root_path):
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
vigil.main(root_path, is_being_tested=True)
|
||||
for file_name in [".summary.pickle", ".creation-time", ".log",
|
||||
for file_name in ["summary.pickle", "creation_time", "log",
|
||||
"foo-metadata"]:
|
||||
self.assertTrue(os.path.exists(".vigil/" + file_name))
|
||||
self.assertEqual(_mount_total(), mount_total)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue