- Replaced `s.currentPath` with `s.configFilePath` for consistent handling of management asset paths. - Adjusted calls to `managementasset.FilePath` and `StaticDir` to use the updated configuration path.
Unified · Split
| @@ -479,7 +479,7 @@ func (s *Server) serveManagementControlPanel(c *gin.Context) { · 478 unmodified lines | ||
| 479 | 479 | c.AbortWithStatus(http.StatusNotFound) |
| 480 | 480 | return |
| 481 | 481 | } |
| 482 | − filePath := managementasset.FilePath(s.currentPath) | |
| 482 | + filePath := managementasset.FilePath(s.configFilePath) | |
| 483 | 483 | if strings.TrimSpace(filePath) == "" { |
| 484 | 484 | c.AbortWithStatus(http.StatusNotFound) |
| 485 | 485 | return |
| @@ -487,7 +487,7 @@ func (s *Server) serveManagementControlPanel(c *gin.Context) { · 1 unmodified line | ||
| 487 | 487 | |
| 488 | 488 | if _, err := os.Stat(filePath); err != nil { |
| 489 | 489 | if os.IsNotExist(err) { |
| 490 | − go managementasset.EnsureLatestManagementHTML(context.Background(), managementasset.StaticDir(s.currentPath), cfg.ProxyURL) | |
| 490 | + go managementasset.EnsureLatestManagementHTML(context.Background(), managementasset.StaticDir(s.configFilePath), cfg.ProxyURL) | |
| 491 | 491 | c.AbortWithStatus(http.StatusNotFound) |
| 492 | 492 | return |
| 493 | 493 | } |
| @@ -776,7 +776,7 @@ func (s *Server) UpdateClients(cfg *config.Config) { · 282 unmodified lines | ||
| 776 | 776 | s.handlers.UpdateClients(&cfg.SDKConfig) |
| 777 | 777 | |
| 778 | 778 | if !cfg.RemoteManagement.DisableControlPanel { |
| 779 | − staticDir := managementasset.StaticDir(s.currentPath) | |
| 779 | + staticDir := managementasset.StaticDir(s.configFilePath) | |
| 780 | 780 | go managementasset.EnsureLatestManagementHTML(context.Background(), staticDir, cfg.ProxyURL) |
| 781 | 781 | } |
| 782 | 782 | if s.mgmt != nil { |