Skip to content

Commit

Permalink
Removed debug output for opening files which might spam server console
Browse files Browse the repository at this point in the history
  • Loading branch information
Timo Smit committed Jan 28, 2017
1 parent ad7b7c6 commit f2458bb
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions luamods/wolfadmin/util/files.lua
Expand Up @@ -54,8 +54,6 @@ function files.open(fileName, fileMode, fileCreate)
fileDescriptor, fileLength = files.create(fileName)
end

outputDebug("util.files.open(): file "..fileName.." opened")

if fileMode == et.FS_READ then
local fileString = et.trap_FS_Read(fileDescriptor, fileLength)

Expand All @@ -70,7 +68,6 @@ function files.open(fileName, fileMode, fileCreate)
end

function files.loadCFG(fileName, idExpr, fileCreate)
local functionStart = et.trap_Milliseconds()
local fileString = files.open(fileName, et.FS_READ, fileCreate)
local arrayCount = 0
local array = {}
Expand All @@ -94,13 +91,10 @@ function files.loadCFG(fileName, idExpr, fileCreate)
table.insert(array[id], data)
end

outputDebug("util.files.loadCFG(): "..arrayCount.." entries loaded in "..et.trap_Milliseconds() - functionStart.." ms")

return arrayCount, array
end

function files.save(fileName, array)
local functionStart = et.trap_Milliseconds()
local fileDescriptor = files.open(fileName, et.FS_WRITE)
local arrayCount = 0

Expand Down Expand Up @@ -128,8 +122,6 @@ function files.save(fileName, array)

et.trap_FS_FCloseFile(fileDescriptor)

outputDebug("util.files.save(): "..arrayCount.." entries saved in "..et.trap_Milliseconds() - functionStart.." ms")

return true
end

Expand Down

0 comments on commit f2458bb

Please sign in to comment.