Runner fails because "filename too long"

My build creates a quite long path, I mean longer than the default 260 characters from windows.
Windows is configured with “long pathname” option so my build is successful locally.

On runner side, first build is successful as well. (Build is running in Win 10 power shell)

On the 2nd build, the runner starts to deletes each file from previous build one after the other, but then fails because the runner fails to delete my long pathname files.

I get this error:
“warning: could not stat path ‘my_long_path/xxx/xxx’: Filename too long
ERROR: Job failed: exit status 1”

Any idea how to fix that ?
Thank you

1 Like

Long path tool was always there for me in this type of problem. I’ve been using it for months now and it is really helpful

2 Likes

Thanks for the insight, @Juan_Miller! and welcome to our forum! :blush:

@Chris1, if the above input was helpful, please mark it as the answer!

My idea is to shorten the path name for each directory, this always works with, but if you just need to let the structure as it or of you have many paths, you can just use the Long Path Tool or Gs RichCopy 360, google both