storage icon indicating copy to clipboard operation
storage copied to clipboard

Unreachable code in storage/drivers/overlay/overlay.go

Open eriksjolund opened this issue 1 year ago • 1 comments

Could this if statement be removed?

https://github.com/containers/storage/blob/2431799327396be3322f440a56567d1d4df733e7/drivers/overlay/overlay.go#L1503-L1506

It seems that permsKnown already needs to be true, because otherwise the for loop would have been skipped.

Here is the relevant code:

https://github.com/containers/storage/blob/2431799327396be3322f440a56567d1d4df733e7/drivers/overlay/overlay.go#L1495-L1507

The code originates from the PR

  • https://github.com/containers/storage/pull/772

eriksjolund avatar Apr 22 '24 17:04 eriksjolund

@giuseppe @mtrmac PTAL

rhatdan avatar Apr 23 '24 21:04 rhatdan

@eriksjolund you are right.

Opened a PR:

  • https://github.com/containers/storage/pull/1934

giuseppe avatar May 30 '24 20:05 giuseppe