[PR #2988] [MERGED] fix: Restore from .db file fails #5319

Closed
opened 2026-10-31 20:46:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/2988
Author: @Columbiysky
Created: 5/9/2025
Status: ✅ Merged
Merged: 5/14/2025
Merged by: @MHSanaei

Base: main ← Head: issue-2953


📝 Commits (3)

  • 9c7cd8b fix: issue 2953. Restore from .db file fails because
  • 8635bfa Merge branch 'main' into issue-2953
  • 86d5d36 Update server.go

📊 Changes

1 file changed (+108 additions, -101 deletions)

View changed files

📝 web/service/server.go (+108 -101)

📄 Description

What is the pull request?

In "web\service\server.go" "ImportDB(file multipart.File)" removed defer os.Remove(tempPath) because later in method it will be renamed "err = os.Rename(tempPath, config.GetDBPath())"
Also removed err = database.InitDB(config.GetDBPath()) and error condition because earlier it already has been inited when it was tempPath.
Issue #2953

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/2988 **Author:** [@Columbiysky](https://github.com/Columbiysky) **Created:** 5/9/2025 **Status:** ✅ Merged **Merged:** 5/14/2025 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `issue-2953` --- ### 📝 Commits (3) - [`9c7cd8b`](https://github.com/MHSanaei/3x-ui/commit/9c7cd8b54ff3c72a4c1ff43abf03a20afb201899) fix: issue 2953. Restore from .db file fails because - [`8635bfa`](https://github.com/MHSanaei/3x-ui/commit/8635bfa88e340907f4a95a51efb7e2a1654ac32f) Merge branch 'main' into issue-2953 - [`86d5d36`](https://github.com/MHSanaei/3x-ui/commit/86d5d368369c8164acc18d91a6daef0896381311) Update server.go ### 📊 Changes **1 file changed** (+108 additions, -101 deletions) <details> <summary>View changed files</summary> 📝 `web/service/server.go` (+108 -101) </details> ### 📄 Description ## What is the pull request? In "web\service\server.go" "ImportDB(file multipart.File)" removed defer os.Remove(tempPath) because later in method it will be renamed "err = os.Rename(tempPath, config.GetDBPath())" Also removed err = database.InitDB(config.GetDBPath()) and error condition because earlier it already has been inited when it was tempPath. Issue #2953 ## Which part of the application is affected by the change? - [ ] Frontend - [x] Backend ## Type of Changes - [x] Bug fix - [ ] New feature - [ ] Refactoring - [ ] Other ## Screenshots <!-- Add screenshots to illustrate the changes --> <!-- Remove this section if it is not applicable. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:46:10 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5319
No description provided.