9.5.6 Create Folder Issue

I have an action that erases a folder and then creates the folder (__UISupport). It was working in 9.2.10, but in 9.5.6 it no longer works. The folder gets deleted, but the folder does not get created.

The annoying part is that the action breakdwon says it created the folder successfully, but it doesn’t get created on the actual endpoint. This causes the action to fail on the wrong line. It fails on the the access to the folder (as it doesn’t exist), instead of failing on the actual folder creation line.

Has anyone else seen something like this? Was this a fluke for me or can others duplicate?

if {windows of operating system}
    parameter "UISupport_Folder" = "{(data folder of client as string) & "\__UISupport"}"
else
    parameter "UISupport_Folder" = "{(data folder of client as string) & "/__UISupport"}"
endif

if {exists folder (parameter "UISupport_Folder")}
    folder delete "{parameter "UISupport_Folder"}"
endif
folder create "{parameter "UISupport_Folder"}"

So first you can totally simplify this by the following

parameter "UISupport_Folder" = "{pathname of data folder of client}/__UISupport"   // Safe as Windows will handle the forward slash
folder delete "{parameter "UISupport_Folder"}"  // Will delete if present otherwise doesn't care
folder create "{parameter "UISupport_Folder"}"

As to it changing in 9.5.6 I’m not aware of anything that would have changed this behaviour.

Thanks for the optimization tip!

The issue hasn’t repeated itself again in the handful of test i have run. Only the first run. I will update the code though and test it on a few more users.

Chris