ioBroker.js-controller icon indicating copy to clipboard operation
ioBroker.js-controller copied to clipboard

Static folders for some adapter is not cleared from old js, css, etc on adapter update - hundreds of Megabytes of crap

Open PeterVoronov opened this issue 4 years ago • 6 comments

Describe the bug
On example of ioBroker.javascript Folder iobroker-data/files/javascript.admin/static is not cleared from old static files, after installing new version of adapter.

To Reproduce
Install adapter and made several upgrades of version

Expected behavior
Only actual static files have to be in

Screenshots & Logfiles
javascript admin javascript admin css

Versions:

  • Adapter version: 5.2.11
  • JS-Controller version: 4.0.9
  • Node version: 14.18.2
  • Operating system: Debian 11

Other affected adapters: ioBroker.web, ioBroker.iot ...

Opened to replace https://github.com/ioBroker/ioBroker.javascript/issues/962

PeterVoronov avatar Feb 23 '22 11:02 PeterVoronov

Same problem Скриншот 22-02-2022 191813

itProfi avatar Feb 23 '22 13:02 itProfi

earseOnUpload flag needs to be set in javascript

foxriver76 avatar Feb 23 '22 13:02 foxriver76

earseOnUpload flag needs to be set in javascript

Where is it?

itProfi avatar Feb 23 '22 13:02 itProfi

Information for us internally, @Apollon77 will fix it for JavaScript

foxriver76 avatar Feb 23 '22 14:02 foxriver76

Current approach would be:

  • Set the flag manually in adapters that have generated UIs for admin/web
  • Discuss here if it is maybe better to change te default to "if not disabled then always erase" for .admin and/or .www with controller 4.1

Apollon77 avatar Feb 23 '22 14:02 Apollon77

Decision is to always delete by default, so we ajust is to "do not delete if set to false"

Affected to add the flag for now:

  • [x] admin
  • [x] iot
  • [x] s7
  • [x] text2command
  • [x] cameras
  • [x] devices
  • [x] web
  • [x] eventlist
  • [x] javascript - @Apollon77
  • [x] scenes
  • [x] modbus
  • [x] homekit-controller
  • [x] echarts
  • [x] material
  • [x] zwave2. https://github.com/AlCalzone/ioBroker.zwave2/pull/833

Apollon77 avatar Feb 23 '22 14:02 Apollon77