mirror of
https://git.aramjonghu.nl/AramJonghu/file-organizer.git
synced 2026-06-06 17:48:23 +02:00
fixed bug where it was not supported for Windows
This commit is contained in:
+2
-1
@@ -19,6 +19,7 @@ fn placeFile(io: std.Io, dir: std.Io.Dir, category: classify.Category, name: []c
|
||||
try dir.createDirPath(io, dest);
|
||||
|
||||
var buf: [std.fs.max_path_bytes]u8 = undefined;
|
||||
const path = try std.fmt.bufPrint(&buf, "{s}/{s}", .{ dest, name });
|
||||
var fba = std.heap.FixedBufferAllocator.init(&buf);
|
||||
const path = try std.fs.path.join(fba.allocator(), &.{ dest, name });
|
||||
try dir.rename(name, dir, path, io);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user