]> git.uzoombox.com Git - uzsdk.git/commitdiff
fix(uzsdk): 1, remove models. v0.3.1
authorbruce <bruce@nanzoom.com>
Mon, 4 Nov 2024 15:45:06 +0000 (15:45 +0000)
committerbruce <bruce@nanzoom.com>
Mon, 4 Nov 2024 15:45:06 +0000 (15:45 +0000)
models/variables.go [deleted file]
uzsdk/configuration.go
version.go

diff --git a/models/variables.go b/models/variables.go
deleted file mode 100644 (file)
index 5fddfdf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-package models
-
-import (
-       "log"
-       "os"
-
-       "git.uzoombox.com/git/uzsdk/utils/osutil"
-)
-
-var (
-       AppDir string // application directory
-       CurDir string // current working directory
-)
-
-func init() {
-       AppDir = osutil.GetAppDirectory()
-
-       dir, err := os.Getwd()
-       if err != nil {
-               log.Fatal(err)
-       }
-       CurDir = dir
-}
index 335f0e64ac5671b78c81fce143c6d798a00443b9..0517d099437df82bfb62c55c78ab0a05a860f370 100644 (file)
@@ -5,9 +5,6 @@ package uzsdk
 import (
        "compress/gzip"
        "fmt"
-       "path/filepath"
-
-       "git.uzoombox.com/git/uzsdk/models"
 )
 
 // Configuration defines application's configuration.
@@ -74,9 +71,6 @@ func (setting *Configuration) Check() {
        if setting.Service.DataDirectory == "" {
                setting.Service.DataDirectory = "/data/uzoombox/cloud"
        }
-       if filepath.Dir(setting.Service.DataDirectory) == "." {
-               setting.Service.DataDirectory = filepath.Join(models.AppDir, setting.Service.DataDirectory)
-       }
        if len(setting.Service.TrustedProxies) == 0 {
                setting.Service.TrustedProxies = append(setting.Service.TrustedProxies, "127.0.0.1")
        }
index da246acc099d369c3d6b3c96ff9f52ecbb0cc5d6..8d6c1419a4aa6d824400a259b670f316805f74cc 100644 (file)
@@ -2,4 +2,4 @@
 package uzsdk
 
 // Version is the current opensdk's version.
-const Version = "0.3.0"
+const Version = "0.3.1"