Fixed some files

This commit is contained in:
mrfry 2020-11-23 17:11:16 +01:00
parent 7fcb15da88
commit b7ac485689
8 changed files with 250 additions and 199 deletions

View file

@ -12,8 +12,8 @@ module.exports = {
GetDateString: GetDateString,
}
const fs = require('fs')
const logger = require('../utils/logger.js')
import fs from 'fs'
import logger from '../utils/logger.js'
function GetDateString(noTime) {
const date = new Date()
@ -96,9 +96,9 @@ function CreatePath(path, onlyPath) {
return
}
var spath = path.split('/')
var currDir = spath[0]
for (var i = 1; i < spath.length; i++) {
const spath = path.split('/')
let currDir = spath[0]
for (let i = 1; i < spath.length; i++) {
if (currDir !== '' && !fs.existsSync(currDir)) {
try {
fs.mkdirSync(currDir)