store: deduplication: Handle fs without d_type support.
authorMathieu Othacehe <othacehe@gnu.org>
Tue, 28 Jul 2020 12:05:09 +0000 (14:05 +0200)
committerMathieu Othacehe <othacehe@gnu.org>
Tue, 28 Jul 2020 12:10:28 +0000 (14:10 +0200)
commit8b221b64a552d31e241701aa5c6d339287a7a15b
treefb0a89652bf0588939ecfc222119f29d869bc716
parent64e8f2ec2dc6301019a5b93a82787ea6adaf8c76
store: deduplication: Handle fs without d_type support.

scandir* uses readdir, which means that the file type property can be 'unknown
if the underlying file-system does not support d_type. Make sure to fallback
to lstat in that case.

Fixes: https://issues.guix.gnu.org/issue/42579.

* guix/store/deduplication.scm (deduplicate): Handle the case where properties
is 'unknown because the underlying file-system does not support d_type.
guix/store/deduplication.scm