Skip to content

Commit

Permalink
changed dir problem
Browse files Browse the repository at this point in the history
  • Loading branch information
bitSheriff committed Sep 26, 2023
1 parent fe1960e commit 5a4eba7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def copy_conf():
import shutil
from . import __file__ as root

root = os.path.dirname(root)
conf = os.path.join(root, 'config.yaml')
root = os.path.dirname(os.path.abspath(__file__))
conf = os.path.join(root, '..', 'config.yaml')
home = os.path.expanduser('~')
dest = os.path.join(home, '.config', 'shelfslide', 'config.yaml')

Expand All @@ -27,13 +27,13 @@ def copy_books_dir():
import shutil
from . import __file__ as root

root = os.path.dirname(root)
books = os.path.join(root, 'books')
root = os.path.dirname(os.path.abspath(__file__))
books = os.path.join(root, '..', 'books')
home = os.path.expanduser('~')
dest = os.path.join(home, '.config', 'shelfslide', 'books')

if not os.path.exists(os.path.dirname(dest)):
os.makedirs(os.path.dirname(dest))

shutil.copytree(books, dest)
print("Books directory copied to {}".format(dest))
print("Books directory copied to {}".format(dest))

0 comments on commit 5a4eba7

Please sign in to comment.