large performance improvement
sorting 400k - 800k files is much faster, and no longer unbearable
This commit is contained in:
parent
73da0a88fe
commit
20f6dc92bc
4 changed files with 13 additions and 14 deletions
|
@ -8,17 +8,17 @@ import (
|
|||
|
||||
const sep = string(os.PathSeparator)
|
||||
|
||||
var (
|
||||
home string = os.Getenv("HOME")
|
||||
pwd, _ = os.Getwd()
|
||||
)
|
||||
|
||||
// UnExpand unexpands some directory shortcuts
|
||||
//
|
||||
// $HOME -> ~
|
||||
// $PWD -> .
|
||||
// workdir -> /
|
||||
func UnExpand(dir, workdir string) (outdir string) {
|
||||
var (
|
||||
home string = os.Getenv("HOME")
|
||||
pwd, _ = os.Getwd()
|
||||
)
|
||||
|
||||
if dir != "" {
|
||||
outdir = cleanDir(dir, pwd)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue