U4-5916 - When deleting a folder under scripts, it throws an exception if it is not empty.

Created by Lian Hoy Lee 01 Dec 2014, 10:10:52 Updated by Shannon Deminick 26 Jun 2017, 06:40:03

What did you do? In Settings > Scripts, create a folder and a script file under it then delete the folder.

What did you expect to happen? I expected a confirmation dialog stating there are existing items in the folder and if I would like to continue.

What actually happened? The right most panel showed the full exception message.

Exception Details: System.IO.IOException: The directory is not empty.

Stack Trace:

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound) at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost) at Umbraco.Core.IO.PhysicalFileSystem.DeleteDirectory(String path, Boolean recursive) at Umbraco.Core.Persistence.UnitOfWork.FileUnitOfWork.Commit() at Umbraco.Core.Services.FileService.DeleteScriptFolder(String folderPath) at umbraco.ScriptTasks.PerformDelete() at Umbraco.Web.Editors.LegacyController.DeleteLegacyItem(String nodeId, String alias, String nodeType) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.b__c(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)


Shannon Deminick 26 Jun 2017, 06:40:03

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/

Priority: Normal

Type: Bug

State: Closed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.1.4

Due in version:


Story Points: