diff --git a/filesystem/iso9660/directoryentry.go b/filesystem/iso9660/directoryentry.go index 1f694781..a6f538e0 100644 --- a/filesystem/iso9660/directoryentry.go +++ b/filesystem/iso9660/directoryentry.go @@ -482,9 +482,24 @@ func (de *directoryEntry) Size() int64 { // Mode() FileMode // file mode bits func (de *directoryEntry) Mode() os.FileMode { + for _, ext := range de.extensions { + if s, ok := ext.(rockRidgeSymlink); ok && !s.continued { + return 0o755 | os.ModeSymlink + } + } return 0o755 } +// Readlink tries to return the target link, only valid for symlinks +func (de *directoryEntry) ReadLink() (string, bool) { + for _, ext := range de.extensions { + if s, ok := ext.(rockRidgeSymlink); ok && !s.continued { + return s.name, true + } + } + return "", false +} + // ModTime() time.Time // modification time func (de *directoryEntry) ModTime() time.Time { return de.creation