Storefront crashes on linux due to hard coded forward slash
Woland2k opened this issue · comments
Alexander Siniouguine commented
It looks like someone @tatarincev 301069e#diff-9a6e5d38f664606f850233428228a1a0
added the following line:
var rootPath = _options.Path.TrimEnd('\\') + '\\';
which is hard coded path that only works in windows. Should use Path.DirectorySeparatorChar instead.
The result is the following exception appears when running storefront on linux:
Application startup exception: System.ArgumentException: The directory name '/vc-storefront/wwwroot/cms-content\' does not exist.
Parameter name: pathat System.IO.FileSystemWatcher..ctor(String path, String filter)
at System.IO.FileSystemWatcher..ctor(String path)
at VirtoCommerce.Storefront.Domain.FileSystemContentBlobProvider..ctor(IOptions`1 options, IStorefrontMemoryCache memoryCache) in d:\Builds\VirtoCommerce\vc-storefront-core\master\workspace\VirtoCommerce.Storefront\Domain\ContentBlobProviders\FileSystemContentBlobProvider.cs:line 35
Tatarincev Eugeney commented
Fixed by this commit ca42b24