Skip to content

Commit bd8f648

Browse files
committed
Expand filesystem support
1 parent 955c810 commit bd8f648

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Asset.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ public static function config(): AssetsConfig
6060
self::$config = config(AssetsConfig::class);
6161

6262
// Standardize formats
63-
self::$config->uri = rtrim(self::$config->uri, '/') . '/';
64-
self::$config->directory = rtrim(self::$config->directory, '/') . '/';
65-
self::$config->vendor = rtrim(self::$config->vendor, '/') . '/';
63+
self::$config->uri = rtrim(self::$config->uri, '/\\') . DIRECTORY_SEPARATOR;
64+
self::$config->directory = rtrim(self::$config->directory, '/\\') . DIRECTORY_SEPARATOR;
65+
self::$config->vendor = rtrim(self::$config->vendor, '/\\') . DIRECTORY_SEPARATOR;
6666
}
6767

6868
return self::$config;
@@ -90,7 +90,7 @@ public static function useConfig(?AssetsConfig $config)
9090
public static function createFromPath(string $path): self
9191
{
9292
$config = self::config();
93-
$path = ltrim($path, '/');
93+
$path = ltrim($path, '/\\');
9494
$file = new File($config->directory . $path, true);
9595

9696
// Build the URI

0 commit comments

Comments
 (0)