Archive: Cannot add files with long file path


Cannot add files with long file path
My installer fails to add the following directory:

"..\..\..\..\..\CMS_Setup_ThirdPartyBin\JBossSources\server\default\deploy\jms\jbossmq-httpil.sar\jbossmq-httpil.war\WEB-INF\classes\org\jboss\mq\il\http\servlet\"

I've checked: this path is less that MAX_PATH (255) so it is rather strange. Having this directory deleted, everything is OK. Maybe NSIS has its own path length restrictions?


You could be right with NSIS having its own length restrictions, i have noticed that on many products etc....


What's the exact error message you get?


File: Descending to: "..\..\..\..\..\CMS_Setup_ThirdPartyBin\JBossSources\server\default\deploy\http-invoker.sar\invoker.war\WEB-INF\classes\org\jboss\invocation\http\servlet\"
File: failed opening file "..\..\..\..\..\CMS_Setup_ThirdPartyBin\JBossSources\server\default\deploy\http-invoker.sar\invoker.war\WEB-INF\classes\org\jboss\invocation\http\servlet\InvokerServlet.class"
Error in script "E:\script\install\<skipped>\NSI\installer.nsi" on line 347 -- aborting creation process


I could only reproduce this error message with long paths that are longer than MAX_PATH. Are you sure the file is not in use or that another process is locking it? Have you tried using !cd first and then including the file with a shorter path? Why do you think it is a problem with the path length?


It seems that it is because the file path mentioned and path to nsi-file itself summary longer that MAX_PATH. I calculated only relative path, but didn't took into account the path to nsi.


Solution
Trying Windows Explorer or FAR to resolve path too long problem? Check out latest Long Path Tool http://LongPathTool.com