[PR #7174] FileBrowser Quantum: safer update (tmp download + atomic replace + arch autodetect) #7021

Open
opened 2025-11-20 08:04:26 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/community-scripts/ProxmoxVE/pull/7174

State: closed
Merged: Yes


✍️ Description

Safer updater for FileBrowser Quantum addon in tools/addon/filebrowser-quantum.sh.

Before (problem)

  • Update path streamed curl directly into /usr/local/bin/filebrowser and printed success even if curl failed.
  • This led to errors like curl: (23) Failure writing output to destination and a false “Updated” message.

After (this PR)

  • Download to a temp file on the same filesystem, then atomic mv into INSTALL_PATH.
  • Print success only if curl and mv succeed.
  • (Also includes the missing fi to close the if [[ -f "$INSTALL_PATH" ]] block.)

No changes to defaults, service unit, or dependencies. amd64 asset unchanged.


Link: N/A


Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Verified on Debian/Proxmox host:
    • Success: downloads to temp and atomically replaces the binary.
    • Failure: forced bad URL → script reports error and does not claim success.
  • No security risks – No secrets; permissions set to 0755; atomic replace avoids partial writes.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves incorrect success message and fragile in-place write.
  • 🔧 Refactoring / Code Cleanup – Small robustness improvement.
  • New feature
  • 💥 Breaking change
  • 🆕 New script
  • 🌍 Website update
  • 📝 Documentation update
**Original Pull Request:** https://github.com/community-scripts/ProxmoxVE/pull/7174 **State:** closed **Merged:** Yes --- <!--🛑 New scripts must be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing. PRs without prior testing will be closed. --> ## ✍️ Description Safer updater for **FileBrowser Quantum** addon in `tools/addon/filebrowser-quantum.sh`. **Before (problem)** - Update path streamed `curl` directly into `/usr/local/bin/filebrowser` and printed success even if `curl` failed. - This led to errors like `curl: (23) Failure writing output to destination` and a false “Updated” message. **After (this PR)** - Download to a **temp file on the same filesystem**, then **atomic `mv`** into `INSTALL_PATH`. - Print success **only if `curl` and `mv` succeed**. - (Also includes the missing `fi` to close the `if [[ -f "$INSTALL_PATH" ]]` block.) _No changes to defaults, service unit, or dependencies. amd64 asset unchanged._ --- ## 🔗 Related PR / Issue Link: N/A --- ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Verified on Debian/Proxmox host: - Success: downloads to temp and atomically replaces the binary. - Failure: forced bad URL → script reports error and does **not** claim success. - [x] **No security risks** – No secrets; permissions set to 0755; atomic replace avoids partial writes. --- ## 🛠️ Type of Change (**X** in brackets) - [x] 🐞 **Bug fix** – Resolves incorrect success message and fragile in-place write. - [x] 🔧 **Refactoring / Code Cleanup** – Small robustness improvement. - [ ] ✨ **New feature** - [ ] 💥 **Breaking change** - [ ] 🆕 **New script** - [ ] 🌍 **Website update** - [ ] 📝 **Documentation update**
saavagebueno added the pull-request label 2025-11-20 08:04:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#7021