Skip to content

Implement asset existence check before folder deletion in FolderManager #399

Description

@coderabbitai

Description

The deleteFolder function in editor/src/DocumentWindows/AssetManager/FolderManager.cpp currently lacks a check for assets within the folder before deletion. This could lead to accidental data loss when folders containing assets are deleted.

Location

  • File: editor/src/DocumentWindows/AssetManager/FolderManager.cpp
  • Method: FolderManager::deleteFolder
  • Lines: Around 97-123

Current Behavior

The function deletes folders without checking if they contain assets, as indicated by the TODO comment.

Expected Behavior

The function should check if the folder contains any assets before deletion and prevent deletion if assets are found.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

assetsThis issue concerns the assets of the engineeditorThis issue concern the assets of the engine

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions