Skip to content

Commit

Permalink
fix datadirpath path calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Feb 18, 2022
1 parent 46201d2 commit 9be8a9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ pub fn main() !void {
//

const dbpath = flag.getSingle("db") orelse "aquila.db";
datadirpath = try std.fs.cwd().realpathAlloc(alloc, dbpath);
datadirpath = std.fs.path.dirname(datadirpath).?;
try db.connect(alloc, dbpath);
const real = try std.fs.realpathAlloc(alloc, dbpath);
datadirpath = std.fs.path.dirname(real).?;

domain = flag.getSingle("domain") orelse @panic("missing required --domain flag");
disable_import_repo = parseBoolFlag("disable-import-repo", false);
Expand Down

0 comments on commit 9be8a9a

Please sign in to comment.