Skip to content

Commit

Permalink
Merge pull request #31 from 8fold/rebuild
Browse files Browse the repository at this point in the history
add: Affordance for sending path without leading forward slash
  • Loading branch information
joshbruce authored May 24, 2023
2 parents 6794417 + 8feaeb5 commit a808134
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/FileSystem/Files/PublicFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public static function inPublicRoot(
$at = substr($at, 0, -1);
}

if (str_starts_with($at, '/') === false) {
$at = '/' . $at;
}

return new self($root, $filename, $at);
}

Expand Down

0 comments on commit a808134

Please sign in to comment.