well.. im not an expert coding, but I saw when I write "samplefolder" on the Media, I got this path on the output:
echo $POST['savepath'].$POST['newname']; (this was the old code from a previous pulse version)
but now when the line:
is triggered, the creation of the folder is showing this route:
maybe the $storage_filename variable is not set properly... just guessing.
I dont get the issue with the old create.php file or commenting the following line on the new code:
$storage_filename = \str_replace( '.txt', '', $storage_filename ) . '.txt';
this seems to solve this problem for this particular issue, but Im sure this is not the good answer, maybe a place to start.