Skip to content

Commit

Permalink
Reapply "FEAT: Implement ability to delete folders with contents (Pat…
Browse files Browse the repository at this point in the history
…hOfBuildingCommunity#410)"

This reverts commit b3e14bd.
  • Loading branch information
LocalIdentity committed Feb 12, 2025
1 parent 251d574 commit 0563dd5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Classes/BuildListControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ end
function BuildListClass:DeleteBuild(build)
if build.folderName then
if NewFileSearch(build.fullFileName.."/*") or NewFileSearch(build.fullFileName.."/*", true) then
main:OpenMessagePopup("Delete Folder", "The folder is not empty.")
main:OpenConfirmPopup("Confirm Folder Delete", "The folder is not empty.\nAre you sure you want to delete folder:\n"..build.folderName.."\nThis cannot be undone.", "Delete", function()
RemoveDir(build.fullFileName, true)
self.listMode:BuildList()
self.selIndex = nil
self.selValue = nil
end)
else
local res, msg = RemoveDir(build.fullFileName)
if not res then
Expand Down

0 comments on commit 0563dd5

Please sign in to comment.