Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

File cleanup of long directory paths



  • We've got a grunt build with a giant list of node/npm dependencies (it's a custom fork of Bootstrap http://getbootstrap.com). After an npm install in the working directory it has a very long path caused by nested dependencies. When the BuildMaster Agent goes to clean out the working directory, whichever means it is using to delete files it fails to delete this particularly nest, leaving just these files behind. Of course, the next time it tries to "split" back to that directory the Agent throws a "Cannot create file when that file already exists".

    Is there a better workaround than deleting the directories manually in File Explorer or using custom working paths (and thus losing some of the benefits of using "clean" paths that the "default" directory structure provides)?

    Product: BuildMaster
    Version: 4.1.0



  • Is there an error/exception stack trace logged when this happens? If so, could you send it to support -at- inedo.com?

    You could try using application-relative paths (starting with ~\) instead of the default directories and adding an explicit delete files/folders action at the start of a deployment.



  • This seems to be the stacktrace I saw the most in working through this:

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: Cannot create a file when that file already exists.
    
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.Directory.InternalMove(String sourceDirName, String destDirName, Boolean checkHost)
       at Inedo.BuildMaster.Extensibility.Agents.RemoteFileOperationsExecuter.<Inedo.BuildMaster.Extensibility.Agents.IFileOperationsExecuter.MoveDirectory>b__a(String s, String d)
       --- End of inner exception stack trace ---
       at Inedo.BuildMaster.Extensibility.Agents.Tcp.TcpAgentClient.RunJob(ITcpAgentCommand command, Action`2 log)
       at Inedo.BuildMaster.Extensibility.Agents.RemoteFileOperationsExecuter.Inedo.BuildMaster.Extensibility.Agents.IFileOperationsExecuter.MoveDirectory(String sourceDirName, String destDirName)
       at Inedo.BuildMaster.Windows.ServiceApplication.PlanExecuter.AgentBasedActionExecuter.InitializeRemoteConfiguration()
       at Inedo.BuildMaster.Windows.ServiceApplication.PlanExecuter.AgentBasedActionExecuter.Initialize()
       at Inedo.BuildMaster.Windows.ServiceApplication.PlanExecuter.ExecutingPlan.ExecutePlan()


  • If you want to delete long directory paths you should use Long Path Tool. It is great tool.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation