Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#760 Delete Failing on Root Folder

0.91-alpha2
open
nobody
Tasks (408)
5
2011-05-13
2011-05-13
Paul Severini
No

I'm gettting intermittent failures on deleting folders using the delete task using NANT .91. This issue continually fails somewhere in the folder structure. It typically fails at the root folder of the path specified by the dir attribute.

<target name="remove-branches-checkout" depends="remove-trunk-checkout">
<delete dir="${local.r2w.clienttools.branches.dir}" />
</target>
Error MEssage:
Cannot delete directory 'c:\rwd\work\report2web\clienttools\trunk'.
The directory is not empty.

Discussion

  • Paul Severini
    Paul Severini
    2011-05-13

    Here's the trace for another random folder that failed.

    C:\rwd\work\report2web\clienttools\build\clienttools_auto.build(6,3):
    Cannot delete directory 'c:\rwd\work\report2web\clienttools\trunk\projects\common\vb6\fileconversions\reader\pagemart'.:
    NAnt.Core.BuildException: C:\rwd\work\report2web\clienttools\build\clienttools_auto.build(6,3):
    Cannot delete directory 'c:\rwd\work\report2web\clienttools\trunk\projects\common\vb6\fileconversions\reader\pagemart'. ---> System.IO.IOException: The directory is not empty.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive)
    at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)
    at System.IO.Directory.Delete(String path)
    at NAnt.Core.Tasks.DeleteTask.DeleteDirectory(String path) in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Tasks\DeleteTask.cs:line 304
    at NAnt.Core.Tasks.DeleteTask.RecursiveDeleteDirectory(String path) in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Tasks\DeleteTask.cs:line 261
    --- End of inner exception stack trace ---
    at NAnt.Core.Tasks.DeleteTask.RecursiveDeleteDirectory(String path) in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Tasks\DeleteTask.cs:line 263
    at NAnt.Core.Tasks.DeleteTask.ExecuteTask() in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Tasks\DeleteTask.cs:line 193
    at NAnt.Core.Task.Execute() in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Task.cs:line 186
    at NAnt.Core.Target.Execute() in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Target.cs:line 247
    at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Project.cs:line 1031
    at NAnt.Core.Project.Execute() in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Project.cs:line 983
    at NAnt.Core.Project.Run() in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Project.cs:line 1068

     
  • Ryan Boggs
    Ryan Boggs
    2011-10-19

    What files remain when that happens?