Skip to content

v2.2.10-beta

Pre-release
Pre-release
Compare
Choose a tag to compare
@fgreinacher fgreinacher released this 28 Nov 20:57
ec1b673
Fix file operations that fail when used with relative paths  (#407)

Root cause for the problems is https://github.com/wleader/System.IO.Abstractions/commit/95ead3a2a3fbe848e34642931f2e5fafc2368c5a#diff-e76db4b13ed41e41943b80f8f1075287 where we started using `Path.GetDirectoryName` to get the parent directory, but unfortunately this method returns an empty string when the path does not contain directory information (e.g. a plain file name).

The changes here make the paths absolute before passing them on to `Path.GetDirectoryName`.

Fixes #404 and #401