Fox files not showing thumbnails in all documents section
All checks were successful
Automated Container Build / build-and-push (push) Successful in 58s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 58s
This commit is contained in:
parent
c9e078586f
commit
83e73b4d52
3 changed files with 44 additions and 1 deletions
25
backend/scratch.go
Normal file
25
backend/scratch.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
storageDir := `C:\Users\Elijah\Desktop\Drive\data`
|
||||
path1 := `C:\Users\Elijah\Desktop\Drive\data\test.docx`
|
||||
path2 := `C:\Users\Elijah\Desktop\Drive\data\folder\test.docx`
|
||||
|
||||
relPath1, _ := filepath.Rel(storageDir, path1)
|
||||
relPathSlash1 := filepath.ToSlash(relPath1)
|
||||
|
||||
relPath2, _ := filepath.Rel(storageDir, path2)
|
||||
relPathSlash2 := filepath.ToSlash(relPath2)
|
||||
|
||||
fmt.Printf("Root file: %q -> %q\n", relPath1, relPathSlash1)
|
||||
fmt.Printf("Sub file: %q -> %q\n", relPath2, relPathSlash2)
|
||||
|
||||
fmt.Printf("Clean . : %q\n", filepath.Clean("."))
|
||||
fmt.Printf("Join . and file: %q\n", filepath.Join(".", "test.docx"))
|
||||
}
|
||||
Reference in a new issue