chore(caldav): improve trimming .ics file ending
This commit is contained in:
parent
e34f503674
commit
c5c74e9537
@ -133,9 +133,7 @@ func (vcls *VikunjaCaldavProjectStorage) GetResourcesByList(rpaths []string) ([]
|
|||||||
var uids []string
|
var uids []string
|
||||||
for _, path := range rpaths {
|
for _, path := range rpaths {
|
||||||
parts := strings.Split(path, "/")
|
parts := strings.Split(path, "/")
|
||||||
uid := []rune(parts[4]) // The 4th part is the id with ".ics" suffix
|
uids = append(uids, strings.TrimSuffix(parts[4], ".ics"))
|
||||||
endlen := len(uid) - len(".ics") // ".ics" are 4 bytes
|
|
||||||
uids = append(uids, string(uid[:endlen]))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s := db.NewSession()
|
s := db.NewSession()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user