File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 77- Fixed "Add URL" not working
88- Total playlist time status line is removed (foobar2000 only)
99- Volume slider now uses linear scale instead of dB (foobar2000 only)
10+ - Fixed browsing directories with ` ! ` in path
1011
1112### Changes in v0.3 (released 2018-09-20):
1213- Added button that locates currently played track
Original file line number Diff line number Diff line change @@ -58,8 +58,11 @@ router.on({
5858
5959 '/files/!*' : ( ) => {
6060 navigationModel . setView ( View . fileBrowser ) ;
61+
6162 const path = getPathFromUrl ( router . lastRouteResolved ( ) . url ) ;
62- fileBrowserModel . browse ( path ) ;
63+
64+ if ( path )
65+ fileBrowserModel . browse ( path ) ;
6366 } ,
6467
6568 '/settings' : ( ) => {
Original file line number Diff line number Diff line change @@ -27,5 +27,10 @@ export default urls;
2727
2828export function getPathFromUrl ( url )
2929{
30- return decodeURIComponent ( url . split ( '!' , 2 ) [ 1 ] ) ;
30+ const index = url . indexOf ( '!' ) ;
31+
32+ if ( index < 0 )
33+ return null ;
34+
35+ return decodeURIComponent ( url . substring ( index + 1 ) ) ;
3136}
You can’t perform that action at this time.
0 commit comments