mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-12-26 20:29:50 +00:00
Tilde expansion for path parameters is slot configuration strings
This commit is contained in:
parent
a4ad599056
commit
30e3a7503d
@ -39,6 +39,14 @@ func LoadResource(filename string) ([]uint8, bool, error) {
|
||||
filename = filename[1 : len(filename)-1]
|
||||
}
|
||||
|
||||
// Expand the tilde if prefixed by it
|
||||
if strings.HasPrefix(filename, "~") {
|
||||
home, err := os.UserHomeDir()
|
||||
if err == nil {
|
||||
filename = home + filename[1:]
|
||||
}
|
||||
}
|
||||
|
||||
var writeable bool
|
||||
var file io.Reader
|
||||
if isInternalResource(filename) {
|
||||
|
Loading…
Reference in New Issue
Block a user