fix: gui start path
This commit is contained in:
@@ -43,18 +43,16 @@ pub fn main() !void {
|
|||||||
|
|
||||||
try rootProvider.providers.append(&localContentProv);
|
try rootProvider.providers.append(&localContentProv);
|
||||||
|
|
||||||
const home_path = try std.fs.cwd().realpathAlloc(allocator, ".");
|
const current_path = try std.fs.cwd().realpathAlloc(allocator, ".");
|
||||||
defer allocator.free(home_path);
|
defer allocator.free(current_path);
|
||||||
|
|
||||||
const start_path = try std.fmt.allocPrint(allocator, "local/{s}", .{home_path});
|
const start_full_name = try local_provider.getFullNameByNativePath(allocator, models.NativePath{ .path = current_path });
|
||||||
defer allocator.free(start_path);
|
defer allocator.free(start_full_name.path);
|
||||||
|
|
||||||
const homeFullName: models.FullName = .{ .path = start_path };
|
|
||||||
|
|
||||||
var tab1 = try allocator.create(Tab);
|
var tab1 = try allocator.create(Tab);
|
||||||
tab1.init(&pool, &rootProvider, allocator);
|
tab1.init(&pool, &rootProvider, allocator);
|
||||||
|
|
||||||
try tab1.setCurrentLocation(homeFullName);
|
try tab1.setCurrentLocation(start_full_name);
|
||||||
|
|
||||||
var appState: AppState = AppState.init(allocator);
|
var appState: AppState = AppState.init(allocator);
|
||||||
try appState.addTab(tab1);
|
try appState.addTab(tab1);
|
||||||
|
|||||||
Reference in New Issue
Block a user