1
0
mirror of https://github.com/taigrr/crocgui synced 2025-01-18 04:03:16 -08:00
crocgui/platforms_android.go
Chris Howey 9d1a04e586 do work in tmp directory
This way android send/receive is more likely to succeed.
2021-03-15 22:30:28 -05:00

22 lines
390 B
Go

package main
import (
"net/url"
"strings"
)
func init() {
// TODO: android probably has a way to find this
DEFAULT_DOWNLOAD_DIR = "/storage/emulated/0/Download"
}
func fixpath(fpath string) string {
if strings.Contains(fpath, "%3A") {
fpath, _ = url.PathUnescape(fpath)
colIdx := strings.Index(fpath, ":")
fpath = "/storage/emulated/0/" + fpath[colIdx+1:]
}
return fpath
}