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