Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #21 from michalochman/allow-relative-files-path
Browse files Browse the repository at this point in the history
Allow relative paths in files_path
  • Loading branch information
everzet committed Sep 18, 2012
2 parents 0b9c044 + 814b4a8 commit 5ed5753
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Behat/MinkExtension/Context/MinkContext.php
Expand Up @@ -178,7 +178,7 @@ public function attachFileToField($field, $path)
$field = $this->fixStepArgument($field);

if ($this->getMinkParameter('files_path')) {
$fullPath = rtrim($this->getMinkParameter('files_path'), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$path;
$fullPath = rtrim(realpath($this->getMinkParameter('files_path')), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$path;
if (is_file($fullPath)) {
$path = $fullPath;
}
Expand Down

0 comments on commit 5ed5753

Please sign in to comment.