i is indexing playlist->tracks here, and we don't want to look in
a sequential storage areas for each track.
I've also added a null-folder check. I'm not sure if -ENOENT is the
right code for “we can't find the parent directory in the storage area
that contains the child”, but it's the only non-success code that
mtpfs_getattr_real returned before this commit. And returning
anything is probably better than segfaulting when we try and
dereference folder with folder->parent_id.
This PR is based on #5, but I can rebase it onto master if the
reformatting in #5 isn't wanted.
i
is indexingplaylist->tracks
here, and we don't want to look in a sequential storage areas for each track.I've also added a null-folder check. I'm not sure if
-ENOENT
is the right code for “we can't find the parent directory in the storage area that contains the child”, but it's the only non-success code thatmtpfs_getattr_real
returned before this commit. And returning anything is probably better than segfaulting when we try and dereference folder withfolder->parent_id
.This PR is based on #5, but I can rebase it onto master if the reformatting in #5 isn't wanted.