https://bugs.kde.org/show_bug.cgi?id=512981

            Bug ID: 512981
           Summary: Adding project files with "list" results in absolute
                    tree paths
    Classification: Applications
           Product: kate
      Version First 25.08.3
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: application
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY
I want to add the .env file to the project which is normally ignored via
.gitignore:

{
  "name": "test",
  "files": [
    {
      "list": [
        ".env"
      ]
    },
    { "git": 1 }
  ]
}

OBSERVED RESULT
This adds the file with it's full path to the tree instead of its relative
path, like the files from git.

EXPECTED RESULT
The tree entry should be relative to the project dir.

ADDITIONAL INFORMATION
The code has an explicit comment, that an absolute path is needed:
https://github.com/KDE/kate/blob/9f7021ea1425f9a306097e97c6d7fbb640b8aa6f/addons/project/kateprojectworker.cpp#L411-L418

But I think this is not correct any more, the filesFromGit function produces
relative paths (git ls-files) and the absolute paths are calculated later in
https://github.com/KDE/kate/blob/9f7021ea1425f9a306097e97c6d7fbb640b8aa6f/addons/project/kateprojectworker.cpp#L319

Just removing the loop seems to fix the problem.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to