Site > File Tree > Add folder toggle

This commit is contained in:
brunosimon
2017-08-09 23:54:53 +02:00
parent c7cf01747a
commit 5cac120de2
8 changed files with 26 additions and 26 deletions
+5 -6
View File
@@ -40,15 +40,14 @@ class FileTree
// Ending `/`
path = path.replace(/\/$/, '')
console.log(path)
// Starting `.`
path = path.replace(/^\./, '')
// Starting `/`
path = path.replace(/^\//, '')
path = './' + path
// Missing starting `./`
if(path !== '.' && path.search('./') !== 0)
{
path = './' + path
}
return path
}