Add configurable ArchiveDirectory

This commit is contained in:
Matthew Penner
2020-04-04 00:17:32 -06:00
parent 3dba11ac6f
commit c096d8802f
4 changed files with 32 additions and 5 deletions

View File

@@ -144,6 +144,11 @@ func main() {
sftp.Initialize(c)
}
// Ensure the archive directory exists.
if err := os.MkdirAll(c.System.ArchiveDirectory, 0755); err != nil {
zap.S().Errorw("failed to create archive directory", zap.Error(err))
}
r := &Router{
token: c.AuthenticationToken,
upgrader: websocket.Upgrader{