We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0aedf8f commit 9cff6cfCopy full SHA for 9cff6cf
Sources/ContainerizationEXT4/EXT4Reader+Export.swift
@@ -130,7 +130,7 @@ extension EXT4.EXT4Reader {
130
entry.fileType = .symbolicLink
131
if size < 60 {
132
let linkBytes = EXT4.tupleToArray(inode.block)
133
- entry.symlinkTarget = String(bytes: linkBytes, encoding: .utf8) ?? ""
+ entry.symlinkTarget = String(bytes: linkBytes.prefix(Int(size)), encoding: .utf8) ?? ""
134
} else {
135
if let block = item.blocks {
136
try self.seek(block: block.start)
0 commit comments