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

[BUG] legacyFolders and legacyFiles only removed if ALL folders and files listed are found in the project. #281

Closed
CyanLaser opened this issue May 6, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@CyanLaser
Copy link

Describe the bug
If a package contains legacyFolders or legacyFiles section in the package manifest, adding this package through VCC will only remove those files and folders if all listed are in the project. If one file or folder is missing, all are left in the project. The package will still be added, causing duplication issues and the GUID conflicts. The documentation on LegacyFolders and LegacyFiles mention "Any folders found with a matching path will be removed." Based on the documentation, if any folder is found, it should be removed. Checking if all exist should not be part of the process.

To Reproduce
Use these files to reproduce the issue:

  • LegacyFiles.unitypackage.zip
    • a package that contains a file and a folder
  • LegacyFiles.zip
    • vpm compatible package with the same files in the .unitypackage.
    • legacyFile and legacyFolder listing the files and folder from the .unitypackage as well as a folder that does not exist.

Steps to reproduce the behavior:

  1. Import the LegacyFiles.unitypackage into a project managed through VCC.
  2. Unzip LegacyFiles.zip outside any project, and add it to the list of user packages in VCC.
  3. Add the LegacyFiles package to the project through VCC.
  4. Observe that the file and folders listed in the legacyFile and legacyFolder still exist in the project and were not deleted. Unity will complain about GUID conflicts due to files not being removed.

Expected behavior
Expected behavior is that the files and folders listed in the legacyFile and legacyFolder section of the package manifest should be removed regardless if one is missing in the project.

Desktop:

  • OS: Windows 11
  • Version 2.1.1

Additional context
This bug affects the CyanTrigger package. CyanTrigger version 0.3 and version 0.4 have different folder structures. Both are still provided as .unitypackages for people to download and import. The VPM version lists legacyFiles and legacyFolders covering both version 0.3 and version 0.4. Since listed folders do not exist in both packages, upgrading a project with either version to the vpm version will leave all files and folders, causing compiler errors and GUID conflicts.

@CyanLaser CyanLaser added the bug Something isn't working label May 6, 2023
esperecyan added a commit to esperecyan/VRMConverterForVRChat that referenced this issue May 16, 2023
[BUG] legacyFolders and legacyFiles only removed if ALL folders and files listed are found in the project. · Issue #281 · vrchat-community/creator-companion
vrchat-community/creator-companion#281
@Faxmashine Faxmashine self-assigned this May 23, 2023
@momo-the-monster
Copy link
Contributor

Should be fixed in VCC 2.1.2!

esperecyan added a commit to esperecyan/VRMConverterForVRChat that referenced this issue Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants