Skip to content

Commit

Permalink
fix: pathing error
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanzyTHEbar committed May 21, 2023
1 parent 6ad87f9 commit 439dcb5
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@

# Find the path to the Desktop
if platform == "linux" or platform == "linux2" or platform == "darwin":
#desktop = pathlib.Path(r"~/")
#desktop = os.path.join(os.path.join(os.path.expanduser('~')), 'Desktop')
desktop = os.path.expanduser("~/Desktop")
desktop_path = os.path.expanduser("~/Desktop")
# check if the path exists
if not os.path.exists(desktop):
# if not, use home directory
desktop = os.path.expanduser("~")
#elif platform == "darwin":
#desktop = pathlib.Path(r"~/Desktop")
#desktop = os.path.join(os.path.join(os.path.expanduser('~')), 'Desktop')
desktop_path = os.path.expanduser("~/")
desktop = pathlib.Path(desktop_path)
elif platform == "win32":
os.path.expanduser("~\\Desktop")
desktop_path = os.path.expanduser("~\\Desktop")
#desktop = os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop')
#desktop = pathlib.Path(r"C:\Users\MyName\Desktop")
desktop = pathlib.Path(desktop_path)

# Create a new folder
for sub_dir in ["CODE", "NOTES", "PDFS", "PICS"]:
Expand Down

0 comments on commit 439dcb5

Please sign in to comment.