deadlyjack / Acode

Acode - powerful text/code editor for android
https://acode.app
MIT License
2.86k stars 393 forks source link

Suggestion for Fixing rename file bug with termux uri #1009

Closed techcodeofficial closed 3 weeks ago

techcodeofficial commented 2 months ago

Hello acode devloper for fix rename file error in acode you can copy file content and create new file with new name and insert content to new file and delete old file

sebastianjnuwu commented 2 months ago

I think this fits with my problem.

bajrangCoder commented 2 months ago

Hello acode devloper for fix rename file error in acode you can copy file content and create new file with new name and insert content to new file and delete old file

Nice idea 👍

I will try to implement it but maybe we need to accept some performance decrement but that's acceptable

techcodeofficial commented 2 months ago

Yes it's nice Idea 💡 Thank you 🙏

bajrangCoder commented 3 weeks ago

This solution is not ideal for directories, so currently this is added for files only

1Code-JS commented 3 weeks ago

This solution is not ideal for directories, so currently this is added for files only

If AcodeX plugin is present and it's server is running on Termux, use mv command

Or (this method could probably cause performance issues if the directory (especially .git) has a lot of (sometimes large) files):

  1. Create a new directory with a new name
  2. If there's are files, move(if can't, copy file and then delete old one) it's files from the old directory to the new one
  3. Repeat steps 1 and 2 for subdirectories
  4. Delete old directory once all files have been moved
bajrangCoder commented 3 weeks ago

First is planned but that's plugin related. And second method isn't ideal for directories, there will many new issues/errors