diff options
| author | Nic Gaffney <gaffney_nic@protonmail.com> | 2026-11-19 19:47:26 -0600 |
|---|---|---|
| committer | Nic Gaffney <gaffney_nic@protonmail.com> | 2026-11-19 19:47:26 -0600 |
| commit | c714d9459d08b3f07d36b275e627473f1c962c83 (patch) | |
| tree | 9c5274c8efd2695485572e94a573261814d5de4b /src/bin/store.zig | |
| parent | c9b27e99a830caae4419018938e796f7c96aedae (diff) | |
| download | nvlope-main.tar.gz | |
Diffstat (limited to 'src/bin/store.zig')
| -rw-r--r-- | src/bin/store.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/store.zig b/src/bin/store.zig index 8d93fec..7eee897 100644 --- a/src/bin/store.zig +++ b/src/bin/store.zig @@ -36,6 +36,9 @@ pub fn init(io: std.Io, dir: []const u8) !Self { pub fn register(self: *Self, io: std.Io, raw: []const u8) !void { var buf: [64]u8 = undefined; const user = try normalizeUser(raw, &buf); + if (try self.exists(io, user)) { + return error.UserExists; + } var mailbox = try self.maildir.openDir(io, "mailboxes", .{}); defer mailbox.close(io); try mailbox.createDir(io, user, @fromBackingInt(@intCast(0o700))); |
