Skip to content

Commit

Permalink
Win path (#202)
Browse files Browse the repository at this point in the history
* fix for Windows paths

* version bump
  • Loading branch information
willmcgugan committed Aug 5, 2018
1 parent b2c0d96 commit bb19924
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [2.0.27] - Unreleased

### Fixed for Winows paths #152

## [2.0.26] - 2018-07-26

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion fs/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version, used in module and setup.py.
"""
__version__ = "2.0.26"
__version__ = "2.0.27a0"
5 changes: 3 additions & 2 deletions fs/osfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ def __init__(
if isinstance(root_path, bytes):
root_path = fsdecode(root_path)
self.root_path = root_path
_root_path = fsdecode(fspath(root_path))
_root_path = os.path.expanduser(os.path.expandvars(root_path))
_drive, _root_path = os.path.splitdrive(fsdecode(fspath(root_path)))
_root_path = _drive + (_root_path or '/') if _drive else _root_path
_root_path = os.path.expanduser(os.path.expandvars(_root_path))
_root_path = os.path.normpath(os.path.abspath(_root_path))
self._root_path = _root_path

Expand Down

0 comments on commit bb19924

Please sign in to comment.