mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-23 11:26:52 +00:00
made getDBFolderPath func private
This commit is contained in:
parent
bb29167ecf
commit
4bc3b27aaa
1 changed files with 13 additions and 13 deletions
|
@ -59,7 +59,19 @@ func GetBinFolderPath() string {
|
||||||
return binFolderPath
|
return binFolderPath
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetDBFolderPath() string {
|
func GetDBPath() string {
|
||||||
|
return fmt.Sprintf("%s/%s.db", getDBFolderPath(), GetName())
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetLogFolder() string {
|
||||||
|
logFolderPath := os.Getenv("XUI_LOG_FOLDER")
|
||||||
|
if logFolderPath == "" {
|
||||||
|
logFolderPath = "/var/log"
|
||||||
|
}
|
||||||
|
return logFolderPath
|
||||||
|
}
|
||||||
|
|
||||||
|
func getDBFolderPath() string {
|
||||||
dbFolderPath := os.Getenv("XUI_DB_FOLDER")
|
dbFolderPath := os.Getenv("XUI_DB_FOLDER")
|
||||||
if dbFolderPath != "" {
|
if dbFolderPath != "" {
|
||||||
return dbFolderPath
|
return dbFolderPath
|
||||||
|
@ -87,18 +99,6 @@ func GetDBFolderPath() string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetDBPath() string {
|
|
||||||
return fmt.Sprintf("%s/%s.db", GetDBFolderPath(), GetName())
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetLogFolder() string {
|
|
||||||
logFolderPath := os.Getenv("XUI_LOG_FOLDER")
|
|
||||||
if logFolderPath == "" {
|
|
||||||
logFolderPath = "/var/log"
|
|
||||||
}
|
|
||||||
return logFolderPath
|
|
||||||
}
|
|
||||||
|
|
||||||
func moveExistingDb(from string, to string) error {
|
func moveExistingDb(from string, to string) error {
|
||||||
if _, err := os.Stat(to); os.IsNotExist(err) {
|
if _, err := os.Stat(to); os.IsNotExist(err) {
|
||||||
if _, err := os.Stat(from); !os.IsNotExist(err) {
|
if _, err := os.Stat(from); !os.IsNotExist(err) {
|
||||||
|
|
Loading…
Reference in a new issue