You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem in this function
private function decomposeFilename(url : String) : void
{
var base : String;
var i : int = url.lastIndexOf('.');
// Get rid of query string if any and extract suffix
base = (url.indexOf('?')>0)? url.split('?')[0] : url;
_fileExtension = base.substr(i + 1).toLowerCase();
_fileName = base.substr(0, i);
}
im using hashsum with floating point like 0.70
and in that case _fileExtension will be "" because url.lastIndexOf('.') is wrong
i fixed it with that changes
private function decomposeFilename(url : String) : void
{
var base : String;
// Get rid of query string if any and extract suffix
base = (url.indexOf('?')>0)? url.split('?')[0] : url;
var i : int = base.lastIndexOf('.');
_fileExtension = base.substr(i + 1).toLowerCase();
_fileName = base.substr(0, i);
}
The text was updated successfully, but these errors were encountered:
Problem in this function
private function decomposeFilename(url : String) : void
{
var base : String;
var i : int = url.lastIndexOf('.');
// Get rid of query string if any and extract suffix
base = (url.indexOf('?')>0)? url.split('?')[0] : url;
_fileExtension = base.substr(i + 1).toLowerCase();
_fileName = base.substr(0, i);
}
im using hashsum with floating point like 0.70
and in that case _fileExtension will be "" because url.lastIndexOf('.') is wrong
i fixed it with that changes
private function decomposeFilename(url : String) : void
{
var base : String;
// Get rid of query string if any and extract suffix
base = (url.indexOf('?')>0)? url.split('?')[0] : url;
var i : int = base.lastIndexOf('.');
_fileExtension = base.substr(i + 1).toLowerCase();
_fileName = base.substr(0, i);
}
The text was updated successfully, but these errors were encountered: