diff options
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))); |
