Fix accidental creation of duplicate files because of extra / in search results

This commit is contained in:
Michael Gapczynski 2012-05-10 22:02:21 -04:00
parent a3f250bfe6
commit 20d9a8b6a1
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ $(document).ready(function() {
a.attr('href','#'); a.attr('href','#');
a.click(function(){ a.click(function(){
var pos=image.lastIndexOf('/') var pos=image.lastIndexOf('/')
var file=image.substr(pos); var file=image.substr(pos + 1);
var dir=image.substr(0,pos); var dir=image.substr(0,pos);
viewImage(dir,file); viewImage(dir,file);
}); });

View File

@ -309,7 +309,7 @@ $(document).ready(function(){
a.attr('href','#'); a.attr('href','#');
a.click(function(){ a.click(function(){
var pos=text.lastIndexOf('/') var pos=text.lastIndexOf('/')
var file=text.substr(pos); var file=text.substr(pos + 1);
var dir=text.substr(0,pos); var dir=text.substr(0,pos);
showFileEditor(dir,file); showFileEditor(dir,file);
}); });