Skip to content

Commit

Permalink
Merge pull request #143 from samih100/Change-HOMEDRIVE-to-SYSTEMDRIVE…
Browse files Browse the repository at this point in the history
…-in-the-fs.py

HOMEDRIVE environment variable to SYSTEMDRIVE
  • Loading branch information
RonnyPfannschmidt committed Jan 7, 2023
2 parents 181bf60 + e49d471 commit 225635a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/142.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed bug where user's HOMEDRIVE exists, but HOMEDRIVE is offline.
6 changes: 4 additions & 2 deletions prance/util/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ def is_pathname_valid(pathname):
_, pathname = os.path.splitdrive(pathname)

# Directory guaranteed to exist. If the current OS is Windows, this is
# the drive to which Windows was installed (e.g., the "%HOMEDRIVE%"
# the drive to which Windows was installed (e.g., the "%SYSTEMDRIVE%"
# environment variable); else, the typical root directory.
# The %systemdrive% (typically c:) is the partition with
# the %systemroot% (typically Windows) directory.
import sys

root_dirname = (
os.environ.get("HOMEDRIVE", "C:")
os.environ.get("SYSTEMDRIVE", "C:")
if sys.platform == "win32"
else os.path.sep
)
Expand Down

0 comments on commit 225635a

Please sign in to comment.