fix: backup path with webbasepath (#4223)

* Update BackupModal.vue

add base path to importDB API call

* fix

add base path to importDB API call
This commit is contained in:
GRCR13 authored and GitHub committed 2026-05-10 22:48:35 +02:00 Unverified
1 parent 887fca86ec
commit 30469fcd10
3 files changed
+10 -8

No files matched your search

+9 -3
View File
@@ -976,12 +976,18 @@ func (s *ServerService) ImportDB(file multipart.File) error {
return common.NewErrorf("Invalid or corrupt db file: %v", err)
}
// Stop Xray (ignore error but log)
xrayStopped := true
defer func() {
if xrayStopped {
if errR := s.RestartXrayService(); errR != nil {
logger.Warningf("Failed to restart Xray after DB import error: %v", errR)
}
}
}()
if errStop := s.StopXrayService(); errStop != nil {
logger.Warningf("Failed to stop Xray before DB import: %v", errStop)
}
// Close existing DB to release file locks (especially on Windows)
if errClose := database.CloseDB(); errClose != nil {
logger.Warningf("Failed to close existing DB before replacement: %v", errClose)
}
@@ -1029,7 +1035,7 @@ func (s *ServerService) ImportDB(file multipart.File) error {
s.inboundService.MigrateDB()
// Start Xray
xrayStopped = false
if err = s.RestartXrayService(); err != nil {
return common.NewErrorf("Imported DB but failed to start Xray: %v", err)
}