|
|
@ -3,8 +3,8 @@ This file is part of EZ-Bkup. |
|
|
|
EZ-Bkup is released under the General Public License 3.0. |
|
|
|
EZ-Bkup is released under the General Public License 3.0. |
|
|
|
See COPYING or <https://www.gnu.org/licenses/> for details.]# |
|
|
|
See COPYING or <https://www.gnu.org/licenses/> for details.]# |
|
|
|
|
|
|
|
|
|
|
|
import logging, times, os, distros |
|
|
|
import logging, times, os |
|
|
|
import "models/routine" |
|
|
|
#import "models/routine" |
|
|
|
|
|
|
|
|
|
|
|
let appPath* = getHomeDir() & ".ez-bkup" |
|
|
|
let appPath* = getHomeDir() & ".ez-bkup" |
|
|
|
let databasePath* = appPath & "/ez-bkup.sqlite" |
|
|
|
let databasePath* = appPath & "/ez-bkup.sqlite" |
|
|
@ -14,8 +14,8 @@ if not dirExists(appPath): |
|
|
|
|
|
|
|
|
|
|
|
var logger = newFileLogger(appPath & "/errors.log") |
|
|
|
var logger = newFileLogger(appPath & "/errors.log") |
|
|
|
let dt = now() |
|
|
|
let dt = now() |
|
|
|
let nowDT = dt.format("M-d-YYYY h:mm:ss tt") |
|
|
|
let nowDT* = dt.format("M-d-YYYY h:mm:ss tt") |
|
|
|
var logMsg: string |
|
|
|
#var logMsg: string |
|
|
|
|
|
|
|
|
|
|
|
proc writeErrorToLog*(logMsg: string) = |
|
|
|
proc writeErrorToLog*(logMsg: string) = |
|
|
|
logger.log(lvlError, logMsg) |
|
|
|
logger.log(lvlError, logMsg) |
|
|
@ -24,7 +24,7 @@ proc writeInfoToLog*(logMsg: string) = |
|
|
|
logger.log(lvlInfo, logMsg) |
|
|
|
logger.log(lvlInfo, logMsg) |
|
|
|
|
|
|
|
|
|
|
|
proc hasCommas*(filename: string):bool = |
|
|
|
proc hasCommas*(filename: string):bool = |
|
|
|
',' in filename |
|
|
|
',' in filename |
|
|
|
|
|
|
|
|
|
|
|
proc getAskPassPath*(): string = |
|
|
|
proc getAskPassPath*(): string = |
|
|
|
var askPassPath: string |
|
|
|
var askPassPath: string |
|
|
|