Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement move_to_trash to Web platform #99769

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

khairul169
Copy link
Contributor

This PR implements move_to_trash for the web platform, enabling the web editor to delete or move files to trash.
If the filesystem is not persistent, the file will be permanently deleted.

Fixes #70975

Comment on lines 270 to 272
if (file_name.length() > 240) {
file_name = file_name.substr(0, file_name.length() - 15);
}
Copy link
Member

@Calinou Calinou Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the ID number below is 99 at most, shouldn't the length check be 253 characters instead (since 99 is 2 characters)?

Copy link
Contributor Author

@khairul169 khairul169 Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's correct! I took this code directly without any changes from platform/linuxbsd/os_linuxbsd.cpp. Will update it accordingly, thanks for pointing that out..

@khairul169 khairul169 force-pushed the feat/imp-web-move-to-trash branch from d03a599 to 6b74713 Compare November 28, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot delete files in web editor
3 participants