I have noticed a strange behaviour with the cfdirectory:delete tag:
<cfdirectory action="delete" directory="" recurse="yes">
This deletes the directory from where the tag was executed. I haven’t yet tried whether this is also the case with DirectoryDelete().
Is this wanted? Or shouldn’t it rather throw an error? This makes it easy to delete your code.
Allan
1 Like
I would have expected it to throw an error that you didn’t provide a directory attribute. Not having a value seems pretty dangerous!
1 Like
I expected it to throw an error. I now call it the agent function. The code destroys itself after being executed once.
The reason I found this was because of an error in the database which caused the function that was supposed to return the path to return an empty string. I have now corrected this on both sides. But it would be nice if this probably unwanted behaviour could be corrected.
yikes!!!
fixed in 6.2.4.16-SNAPSHOT and 7.0.1.87-SNAPSHOT
https://luceeserver.atlassian.net/browse/LDEV-5939
4 Likes