Zeronet: -upgrade prefix for files that can be upgraded

Created on 23 Aug 2018  路  7Comments  路  Source: HelloZeroNet/ZeroNet

Use case

Only files in CSS/JS folders of clonned zites are upgraded, but -upgrade prefix makes other files upgradeables.
As in #1529 (-noupgrade prefix), the files are renamed on clonning and added to content.json.

All 7 comments

As mentioned in #1531:
Instead of using prefixes in file names (it will make names very ugly), site owner can add those infos in content.json.

Only files in CSS/JS folders of clonned zites are upgraded, but -upgrade prefix makes other files upgradeables.

I'm not sure this happens: checking in the source of ZeroHello the click on "Upgrade code"

https://github.com/HelloZeroNet/ZeroHello/blob/86dc032abd939ebfe4e5e8a62fb6f0d401073560/js/PageSites/Site.coffee#L110-L113

calls the API siteClone with target_address which is in the code below:

https://github.com/HelloZeroNet/ZeroNet/blob/030ad0a8de20443eabbb454ffba3b02d620af93f/src/Ui/UiWebsocket.py#L930-L946

https://github.com/HelloZeroNet/ZeroNet/blob/030ad0a8de20443eabbb454ffba3b02d620af93f/src/Ui/UiWebsocket.py#L912-L928

and I don't see any mention to the "js" or "css" folders, I think the code simply gets every file that is in the cloned site, creating an exact copy except for some data in content.json.
Maybe @HelloZeroNet can confirm or deny.

With the new PR #1542 which modifies Site/Site.py#clone the files with -noclone should not be cloned nor upgraded...

@HelloZeroNet @shortcutme

Yes the update source code is overwrites everything, but the data

So I see no possible use case for this infix that is not already covered by the general update strategy: every file, if not otherwise specified with "-noclone", will be upgraded...

@HelloZeroNet What about newly created files in the cloned site that didn't exist in the original one? Are they deleted or simply left as is?

I don't throught there are all files, but only JS/CSS.
Then this is not needed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DaniellMesquita picture DaniellMesquita  路  3Comments

DaniellMesquita picture DaniellMesquita  路  3Comments

wigy-opensource-developer picture wigy-opensource-developer  路  4Comments

blurHY picture blurHY  路  3Comments

BenMcLean picture BenMcLean  路  3Comments