diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2018-10-18 08:07:09 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-18 08:07:09 +1100 |
| commit | 6863923d5411e6e5e4cd1d27e510f7b656ea01f3 (patch) | |
| tree | 3bb26c975191a9abf5e8d2f95d5853255f0eb8df /pywal/colors.py | |
| parent | f38d630a63d9d33f3d43443d0e0f7c9a3702bf24 (diff) | |
| parent | cfbd5353cffb1ff5ba0de4545abd8a12f0dad919 (diff) | |
Merge pull request #317 from dylanaraps/revert-308-feat/hash-file-for-cache-fname
Revert "Hash file for cache filename"
Diffstat (limited to 'pywal/colors.py')
| -rw-r--r-- | pywal/colors.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pywal/colors.py b/pywal/colors.py index 246318c..a87ee4c 100644 --- a/pywal/colors.py +++ b/pywal/colors.py @@ -4,6 +4,7 @@ Generate a palette using various backends. import logging import os import random +import re import sys from . import theme @@ -85,9 +86,9 @@ def saturate_colors(colors, amount): def cache_fname(img, backend, light, cache_dir, sat=""): """Create the cache file name.""" color_type = "light" if light else "dark" - file_hash = util.hashf(img) + file_name = re.sub("[/|\\|.]", "_", img) - file_parts = [file_hash, color_type, backend, sat, __cache_version__] + file_parts = [file_name, color_type, backend, sat, __cache_version__] return [cache_dir, "schemes", "%s_%s_%s_%s_%s.json" % (*file_parts,)] |
