Skip to content

Commit

Permalink
Fix filepath formatting for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Fittiboy committed Apr 29, 2021
1 parent d021ca9 commit e5bc04c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clipper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
import urllib.request as dl
import sys
from os.path import isfile, isdir, realpath
from os.path import isfile, isdir, realpath, basename
from os.path import join as pjoin
from os import remove, makedirs, listdir
from datetime import datetime, timedelta
Expand Down Expand Up @@ -136,7 +136,8 @@ def dl_progress(count, block_size, total_size):
args = parser.parse_args()

filepath = realpath(__file__)
filedir = "/".join(filepath.split("/")[:-1]) + "/"
filename = basename(filepath)
filedir = filepath[:-len(filename)]

gdrive_credentials = pjoin(filedir, "credentials.txt")

Expand Down

0 comments on commit e5bc04c

Please sign in to comment.