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:
@@ -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();
|
||||
}
|
||||
|
5
ifm.php
5
ifm.php
@@ -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();
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user