Skip to content

Commit

Permalink
Merge pull request #1 from xamount/xamount-patch-1
Browse files Browse the repository at this point in the history
Update File.php (Windows path fixes)
  • Loading branch information
xamount authored Aug 25, 2023
2 parents f3db27e + 40ed8f8 commit 9a04190
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/CAS/PGTStorage/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ function __construct($cas_parent,$path)
if (!preg_match('`^[a-zA-Z]:`', $path)) {
phpCAS::error('an absolute path is needed for PGT storage to file');
}

// ensure that the directory separator on Windows is '/' for consistency with the rest of the phpcas code
$path = str_replace(DIRECTORY_SEPARATOR , '/', $path);

// store the path (with a trailing '/')
$path = preg_replace('|([^/])$|', '$1/', $path);

} else {

Expand Down

0 comments on commit 9a04190

Please sign in to comment.