mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
khal: fix trailing slash bug for singlefile calendars
Fix the trailing slash bug described in issue #8024 by conditionally adding a slash only for filesystem type, not for singlefile. Also update the expected test output to match the correct order.
This commit is contained in:
parent
58d90d298d
commit
b8082c6803
2 changed files with 10 additions and 8 deletions
|
|
@ -58,7 +58,7 @@ let
|
||||||
"[[${name}]]"
|
"[[${name}]]"
|
||||||
"path = ${
|
"path = ${
|
||||||
value.local.path
|
value.local.path
|
||||||
+ "/" # TODO: dont add slash if type is "singlefile"
|
+ (if value.local.type == "singlefile" then "" else "/")
|
||||||
+ (optionalString (value.khal.type == "discover") value.khal.glob)
|
+ (optionalString (value.khal.type == "discover") value.khal.glob)
|
||||||
+ (optionalString (
|
+ (optionalString (
|
||||||
value.khal.type == "birthdays" && value.khal ? thisCollection
|
value.khal.type == "birthdays" && value.khal ? thisCollection
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,15 @@ type=calendar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[[testSinglefile]]
|
||||||
|
path = $XDG_CONFIG_HOME/cal/timetable.ics
|
||||||
|
readonly = True
|
||||||
|
addresses= study@university.edu
|
||||||
|
priority=10
|
||||||
|
type=calendar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[[testWithAddresss]]
|
[[testWithAddresss]]
|
||||||
path = /home/hm-user/$XDG_CONFIG_HOME/cal/testWithAddresss/
|
path = /home/hm-user/$XDG_CONFIG_HOME/cal/testWithAddresss/
|
||||||
addresses= john.doe@email.com
|
addresses= john.doe@email.com
|
||||||
|
|
@ -23,13 +32,6 @@ priority=10
|
||||||
type=calendar
|
type=calendar
|
||||||
|
|
||||||
|
|
||||||
[[testSinglefile]]
|
|
||||||
path = $XDG_CONFIG_HOME/cal/timetable.ics
|
|
||||||
readonly = True
|
|
||||||
addresses= study@university.edu
|
|
||||||
priority=10
|
|
||||||
type=calendar
|
|
||||||
|
|
||||||
|
|
||||||
[[testcontacts-automaticallyCollected]]
|
[[testcontacts-automaticallyCollected]]
|
||||||
path = /home/hm-user/$XDG_CONFIG_HOME/card/testcontacts/automaticallyCollected
|
path = /home/hm-user/$XDG_CONFIG_HOME/card/testcontacts/automaticallyCollected
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue