From 6bd41ad01625fc8876305154a623e9082e259b57 Mon Sep 17 00:00:00 2001 From: link Date: Tue, 17 May 2022 12:57:34 +0800 Subject: [PATCH] fix bug (#198) --- CHANGELOG.md | 6 ++++++ route/v1/docker.go | 6 +++--- types/system.go | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 575eec560a5cc1614300bb718d2020f6f00e69e4..e6496598722c6c62598b48000d1324780b5d8a28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +## [0.3.1.1] - 2022-05-17 + +### Fixed + +- Fix the data loss problem when importing local applications + ## [0.3.1] - 2022-05-16 ### Added diff --git a/route/v1/docker.go b/route/v1/docker.go index 0b74300f9f3a719a5b89a4fd9947dceea894ab7c..14341c615026463e0a1fd9c811a75e5a288059b3 100644 --- a/route/v1/docker.go +++ b/route/v1/docker.go @@ -1268,10 +1268,10 @@ func ContainerUpdateInfo(c *gin.Context) { var vol model.PathArray // json2.Unmarshal([]byte(appInfo.Volumes), &vol) - for i := 0; i < len(info.HostConfig.Mounts); i++ { + for i := 0; i < len(info.Mounts); i++ { temp := model.PathMap{ - Path: strings.ReplaceAll(info.HostConfig.Mounts[i].Source, "$AppID", info.Name), - ContainerPath: info.HostConfig.Mounts[i].Target, + Path: strings.ReplaceAll(info.Mounts[i].Source, "$AppID", info.Name), + ContainerPath: info.Mounts[i].Destination, } vol = append(vol, temp) } diff --git a/types/system.go b/types/system.go index 2ca0f19afddf155cc4a9fbe62e57881ed5b1d56c..e3c7d0c26dd076651ca7cce5a92a5643f32f2a29 100644 --- a/types/system.go +++ b/types/system.go @@ -2,7 +2,7 @@ * @Author: LinkLeong link@icewhale.com * @Date: 2022-02-17 18:53:22 * @LastEditors: LinkLeong - * @LastEditTime: 2022-05-13 18:08:25 + * @LastEditTime: 2022-05-17 12:52:47 * @FilePath: /CasaOS/types/system.go * @Description: * @Website: https://www.casaos.io @@ -10,6 +10,6 @@ */ package types -const CURRENTVERSION = "0.3.1" +const CURRENTVERSION = "0.3.1.1" -const BODY = "" +const BODY = "
  • Fix the data loss problem when importing local applications
  • "