dmolchanenko / RedwoodHQ

Other
161 stars 96 forks source link

Error after the last script in a folder is deleted. #16

Open Itsme23333 opened 7 years ago

Itsme23333 commented 7 years ago

After the last script in a folder is deleted, then when a new script is created in that folder, an error message is displayed, "ENOENT: no such file or directory, open 'C:\Program Files\RedwoodHQ\public\automationscripts\Sample\admin\src\xyz\GroovyAction.groovy'. This is in Windows 7.

The underlying problem seems to be that after the last script in a folder is deleted, the folder is deleted from the underlying file system, but the folder remains in the UI for Redwood HQ.

To reproduce the problem: 1) Go to the scripts tab and right click on the src folder and select New, Folder 2) Name the folder xyz 3) Open windows explorer and verify that the xyz folder was created 4) In Redwood, right click on the xyz folder and choose New, Groovy Action 5) Accept the default name for the action and click save 6) In Redwood, right click on GroovyAction.groovy and click delete, then click yes to confirm 7) Note that the folder xyz still exists in Redwood 8) Click on windows explorer and verify that folder xyz no longer exists in the file system. Note that the expected behavior here would be for the folder xyz to remain in the file system and not be deleted. Another acceptable behavior here would be to delete the folder in both places, although that is not as good as the expected behavior. 9) Repeat steps 4 and 5. Note the above stated error message.