Skip to content

Commit

Permalink
some fixes for the windows implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
evertonstz committed Dec 8, 2019
1 parent 81e7a6d commit 74f170b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pynps.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ def save_conf(file, conf):
def create_config(file, folder):
"""this function is used to create a configuration
file on first run"""

config = configparser.ConfigParser()

# for linux
Expand All @@ -541,11 +542,11 @@ def create_config(file, folder):
# for windows
if _SYSTEM == 'Windows':
print(11)
config['pyNPS'] = {'DownloadFolder': './downloads/',
'DatabaseFolder': "./database/"}
config['pyNPS'] = {'DownloadFolder': './pynps_downloads/',
'DatabaseFolder': "./pynps_database/"}

config['BinaryLocations'] = {'Pkg2zip_Location': "./lib/pkg2zip.exe",
'Wget_location': "./lib/wget.exe"}
config['BinaryLocations'] = {'Pkg2zip_Location': "./pynps_config/lib/pkg2zip.exe",
'Wget_location': "./pynps_config/lib/wget.exe"}
# for ??
else:
config['pyNPS'] = {'DownloadFolder': '',
Expand Down Expand Up @@ -589,7 +590,7 @@ def main():
CONFIGFOLDER = f"{os.getenv('HOME')}/.config/pyNPS"
config_file = f"{CONFIGFOLDER}/settings.ini"
elif _SYSTEM == 'Windows':
CONFIGFOLDER = get_script_dir()
CONFIGFOLDER = f"{get_script_dir()}/pynps_config/"
config_file = f"{CONFIGFOLDER}/settings.ini"
else:
CONFIGFOLDER = ""
Expand Down

0 comments on commit 74f170b

Please sign in to comment.