feat(windows): fix windows bugs

This commit is contained in:
Ádám Kovács
2025-05-14 05:17:36 +02:00
parent adb735811c
commit 8b9e51cf30
6 changed files with 69 additions and 32 deletions

View File

@@ -20,21 +20,26 @@ pub fn main() !void {
var localContentProvider = local_provider.LocalContentProvider{ .threadPool = &pool };
const fullName: models.FullName = .{ .path = "/home/adam/1.txt" };
var item = try localContentProvider.getItemByFullName(fullName, allocator, allocator);
var item = try localContentProvider.getItemByFullName(fullName, &.{}, allocator);
defer item.deinit();
const homeFullName: models.FullName = .{ .path = "/home/adam/" };
var homeItem = try localContentProvider.getItemByFullName(homeFullName, allocator, allocator);
defer homeItem.deinit();
const homeFullName: models.FullName = .{ .path = "C:\\Users\\adakovacs" };
const homeItem = try localContentProvider.getItemByFullName(homeFullName, &.{}, allocator);
// defer homeItem.deinit();
const c = switch (homeItem.item) {
.container => |c| c,
.element => unreachable,
};
var tab1 = Tab.create(&pool, allocator);
var tab1 = try allocator.create(Tab);
defer allocator.destroy(tab1);
tab1.init(&pool, allocator);
defer tab1.deinit();
tab1.setCurrentLocation(c);
std.Thread.sleep(1 * std.time.ns_per_s);
std.Thread.sleep(5 * std.time.ns_per_s);
}
const std = @import("std");