mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Fixed some files
This commit is contained in:
parent
7fcb15da88
commit
b7ac485689
8 changed files with 250 additions and 199 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue