micromata / dave

A totally simple and very easy to configure stand alone webdav server
Apache License 2.0
350 stars 46 forks source link

use single quotes in sample config #46

Closed divinity76 closed 1 year ago

divinity76 commented 1 year ago

unix-y users are unaffected, but this makes life easier for Windows users:

Windows-users are likely to edit dir: "/tmp" to something like dir: "C:\Users\username\whatever"

and as explained in https://github.com/micromata/dave/issues/31#issuecomment-880377263

\U, \\U, \u and \\u makes golang expect a eight or four character unicode, which is why it expects a hexadecimal number.

and dave will then spew the rather cryptic message

dave.exe time="2023-03-22T23:13:20+01:00" level=fatal msg="Fatal error config file: While parsing config: yaml: line 26: did not find expected hexdecimal number"

but with this change, Windows-users are more likely to change it into something like dir: 'C:\Users\username\whatever'

and Dave will start just fine :)

samhocevar commented 1 year ago

These changes make sense, thanks.