Page 1 of 1

Option to NOT delete files when generating

Posted: Sun Oct 01, 2023 3:04 am
by bkonia

When generating files, PHPMaker deletes each existing file before generating the updated file. This causes problems with real-time sync, because when a file is deleted locally, the sync process also deletes it from the server. Thus, users may see 404 errors on the site each time files are generated.

Therefore, I'd like to request an option to NOT delete files during the generation process. Any existing files should simply be overwritten by the updated files.


Re: Option to NOT delete files when generating

Posted: Sun Oct 01, 2023 11:47 am
by mobhar

For such case, then you should disable that real-time synchronization first, before re-generating ALL the script files in localhost.

After all files are finished generated, then you may enable the real-time synch again. I think that's the closest approach to solve your issue.


Re: Option to NOT delete files when generating

Posted: Sun Oct 01, 2023 3:49 pm
by motfs

If your real-time sync software has an idle time or delay time setting or similar, you should set it so that your software waits until the idle/delay time has passed and no further changes were detected.


Re: Option to NOT delete files when generating

Posted: Mon Oct 02, 2023 11:41 pm
by bkonia

Yes, I can work around it by pausing the sync during page generation, or by increasing the delay, etc... Still, it would be better to replace files rather than deleting and creating entirely new files.