1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-10 01:56:30 +02:00

fix missing encoding for initial chdir

This commit is contained in:
Marco Dickert
2017-07-24 15:26:05 +02:00
parent 191faa4678
commit ab31ade042
3 changed files with 9 additions and 6 deletions

View File

@@ -1772,7 +1772,8 @@ function IFM( params ) {
*/
this.historyPopstateHandler = function(event) {
var dir = "";
if( event.state && event.state.dir ) dir = decodeURIComponent( event.state.dir );
if( event.state && event.state.dir )
dir = event.state.dir;
self.changeDirectory( dir, { pushState: false, absolute: true } );
};
@@ -2048,7 +2049,7 @@ function IFM( params ) {
window.onpopstate = self.historyPopstateHandler;
// load initial file table
if( window.location.hash ) {
self.changeDirectory( window.location.hash.substring( 1 ) );
self.changeDirectory( decodeURIComponent( window.location.hash.substring( 1 ) ) );
} else {
this.refreshFileTable();
}

View File

@@ -1772,7 +1772,8 @@ function IFM( params ) {
*/
this.historyPopstateHandler = function(event) {
var dir = "";
if( event.state && event.state.dir ) dir = decodeURIComponent( event.state.dir );
if( event.state && event.state.dir )
dir = event.state.dir;
self.changeDirectory( dir, { pushState: false, absolute: true } );
};
@@ -2048,7 +2049,7 @@ function IFM( params ) {
window.onpopstate = self.historyPopstateHandler;
// load initial file table
if( window.location.hash ) {
self.changeDirectory( window.location.hash.substring( 1 ) );
self.changeDirectory( decodeURIComponent( window.location.hash.substring( 1 ) ) );
} else {
this.refreshFileTable();
}

View File

@@ -1034,7 +1034,8 @@ function IFM( params ) {
*/
this.historyPopstateHandler = function(event) {
var dir = "";
if( event.state && event.state.dir ) dir = decodeURIComponent( event.state.dir );
if( event.state && event.state.dir )
dir = event.state.dir;
self.changeDirectory( dir, { pushState: false, absolute: true } );
};
@@ -1310,7 +1311,7 @@ function IFM( params ) {
window.onpopstate = self.historyPopstateHandler;
// load initial file table
if( window.location.hash ) {
self.changeDirectory( window.location.hash.substring( 1 ) );
self.changeDirectory( decodeURIComponent( window.location.hash.substring( 1 ) ) );
} else {
this.refreshFileTable();
}