fix bug (studio-42#3728)#3735
Conversation
|
Thanks for the PR. I can see the intention here, but I’m not comfortable merging this as-is. I understand the reported issue in #3728, but on my side I could not clearly reproduce a save failure just by switching directories. After saving, elFinder posts the content back to the original file hash with Because of that, I’m not yet convinced that storing an extra For now, I’m going to leave this unmerged unless we can get a clearer reproduction path or a smaller fix. |
Using nao-pon's guidance, supply the already stored file mime in "this.file.mime" to "$base.data('mime', this.file.mime)" rather than storing an extra loadedFile object on the editor.
|
Thanks nao-pon for taking a look at this, i have revised the fix using your guidance and used "this.file.mime" that has the stored file mime and supplied it to "$base.data('mime', this.file.mime)"; both "TUI" & "Photopea" are working properly. this looks like an isolated case, the bug was reported a while ago and there has been no additional reports since then; so i think this can be closed now and can serve as a reference to the issue for anybody who encounters it. |
when file is opened in the current directory, store the file node with "fm.file" function; then use it if the "fm.file" function can not find the file in the switched directory.