Uploaded image for project: 'Container Tools'
  1. Container Tools
  2. RUN-2255

[containers/storage] Fix `d.getStagingDir("")`

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • c/storage
    • False
    • None
    • False
    • rhel-sst-container-tools

      [2523446642] Upstream Reporter: Miloslav Trmač
      Upstream issue status: Open
      Upstream description:

      Since #1784 , https://github.com/containers/storage/blob/10981abafe3e3ece4e0cc872761f7624cd1bef0e/drivers/overlay/overlay.go#L2188 is calling getStagingDir(""), i.e. dir2 with a layer ID "".

      Just from reading the code, that happens to work as expected because it is not using the primary return value of dir2, but that?s extremely non-obvious and very likely to be broken during future maintenance. To the extent the cod is only looking for the ?homeDir?, I think that should be modeled explicitly and not use the id value at all. Alternatively, if the id value mattered, then this needs to actually be implemented.

      Cc: @giuseppe


      Upstream URL: https://github.com/containers/storage/issues/2092

              Unassigned Unassigned
              upstream-sync Upstream Sync
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: