Support line with ACL permissions (#146)

closes #145
This commit is contained in:
Julian Kornberger
2019-05-22 12:26:03 +02:00
committed by Julien Laffaye
parent 8f5b34ce00
commit 9284a88df5
2 changed files with 38 additions and 26 deletions

View File

@@ -73,8 +73,10 @@ func parseRFC3659ListLine(line string, now time.Time, loc *time.Location) (*Entr
// the UNIX ls command.
func parseLsListLine(line string, now time.Time, loc *time.Location) (*Entry, error) {
// Has the first field a length of 10 bytes?
if strings.IndexByte(line, ' ') != 10 {
// Has the first field a length of exactly 10 bytes
// - or 10 bytes with an additional '+' character for indicating ACLs?
// If not, return.
if i := strings.IndexByte(line, ' '); !(i == 10 || (i == 11 && line[10] == '+')) {
return nil, errUnsupportedListLine
}