Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The InstalledFile of dpkg package should exclude directories #6548

Closed
knqyf263 opened this issue Apr 24, 2024 Discussed in #6543 · 1 comment · Fixed by #6551
Closed

The InstalledFile of dpkg package should exclude directories #6548

knqyf263 opened this issue Apr 24, 2024 Discussed in #6543 · 1 comment · Fixed by #6551
Labels
bug help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@knqyf263
Copy link
Collaborator

Description

The logic to exclude directories doesn't work in cases where a list of files/dirs is not sorted.

// Add the file if it is not directory.
// e.g.
// /usr/sbin
// /usr/sbin/tarcat
//
// In the above case, we should take only /usr/sbin/tarcat since /usr/sbin is a directory
if !strings.HasPrefix(current, previous+"/") {
installedFiles = append(installedFiles, previous)
}
previous = current

Discussed in #6543

@knqyf263 knqyf263 added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. bug labels Apr 24, 2024
@y4ney
Copy link
Contributor

y4ney commented Apr 24, 2024

Hi,@knqyf263 ! I have submitted a PR #6551 to address this issue and would appreciate your review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants