Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
general: Create dirs first.
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Apr 29, 2018
1 parent 47502c2 commit 6e5f82b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion pywal/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import shutil
import sys

from .settings import __version__, CACHE_DIR
from .settings import __version__, CACHE_DIR, CONF_DIR
from . import colors
from . import export
from . import image
Expand Down Expand Up @@ -186,6 +186,9 @@ def parse_args(parser):

def main():
"""Main script function."""
util.create_dir(os.path.join(CONF_DIR, "templates"))
util.create_dir(os.path.join(CONF_DIR, "colorschemes"))

util.setup_logging()
parser = get_args()

Expand Down
1 change: 0 additions & 1 deletion pywal/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def every(colors, output_dir=CACHE_DIR):
colors = flatten_colors(colors)
template_dir = os.path.join(MODULE_DIR, "templates")
template_dir_user = os.path.join(CONF_DIR, "templates")
util.create_dir(template_dir_user)

join = os.path.join # Minor optimization.
for file in [*os.scandir(template_dir),
Expand Down
2 changes: 0 additions & 2 deletions pywal/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def file(input_file):
user_theme_file = os.path.join(CONF_DIR, "colorschemes", theme_name)
theme_file = os.path.join(MODULE_DIR, "colorschemes", theme_name)

util.create_dir(os.path.dirname(user_theme_file))

# Find the theme file.
if os.path.isfile(input_file):
theme_file = input_file
Expand Down

0 comments on commit 6e5f82b

Please sign in to comment.