Browse Source

added comment regarding line breaks

Fabian Peter Hammerle 4 years ago
parent
commit
01af2e2f59
1 changed files with 3 additions and 0 deletions
  1. 3 0
      ical2vdir/__init__.py

+ 3 - 0
ical2vdir/__init__.py

@@ -93,6 +93,9 @@ def _write_event(event: icalendar.cal.Event, path: pathlib.Path):
         prefix="ical2vdir-", suffix=_VDIR_EVENT_FILE_EXTENSION
     )
     try:
+        # > Content lines are delimited by a line break,
+        # > which is a CRLF sequence [...]
+        # https://tools.ietf.org/html/rfc5545#section-3.1
         os.write(temp_fd, event.to_ical())
         os.close(temp_fd)
         os.rename(temp_path, path)