playcanvas / playcanvas-sync

Real-time synchronization of files between PlayCanvas and your local machine
https://playcanvas.com/
MIT License
75 stars 18 forks source link

Watch: compare file hashes #49

Closed querielo closed 2 years ago

querielo commented 2 years ago

Right now, playcanvas-sync watches on modification time of files. It causes a problem when files are overwritten but their content is not changed.

Right not we check file hashes if modification time is changed to be sure that we don't reupload non-changed files.

yaustar commented 2 years ago

I believe modification time was used because it is faster to check when there are hundreds of JS files compared to just using hash. However, maybe a combination of both should be used, modification time for the initial check and then file hash on 'modified' files.

querielo commented 2 years ago

I'll take it.