Skip to content

Commit

Permalink
- Fix download/edit files on termux.
Browse files Browse the repository at this point in the history
Signed-off-by: Boudjada Yasser <by.root96@gmail.com>
  • Loading branch information
yasserbdj96 committed Jun 15, 2023
1 parent 86a4b61 commit e4915fd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions hiphp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,22 @@ def get_download_folder():
else:
# Unsupported operating system
download_folder = None
try:
if not download_folder.exists():
# Create the directory
download_folder.mkdir(parents=True)
except:
pass

return download_folder

"""if os.name == 'nt': # Windows
download_folder = os.path.expanduser('~/Downloads')
elif os.name == 'posix': # Linux, macOS, and other UNIX-based systems
download_folder = os.path.expanduser('~/Downloads')
else:
# Unsupported operating system
download_folder = None"""

return download_folder
download_folder = get_download_folder()
Expand Down

1 comment on commit e4915fd

@vercel
Copy link

@vercel vercel bot commented on e4915fd Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hiphp – ./

hiphp-yasserbdj96.vercel.app
hiphp-git-main-yasserbdj96.vercel.app
hiphp.vercel.app

Please sign in to comment.