Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
srvpro
Commits
aa69147c
Commit
aa69147c
authored
Nov 17, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix download replay
parent
b2ff4353
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
ygopro-server.coffee
ygopro-server.coffee
+5
-5
ygopro-server.js
ygopro-server.js
+6
-6
No files found.
ygopro-server.coffee
View file @
aa69147c
...
...
@@ -99,10 +99,10 @@ checkFileExists = (path) =>
catch
e
return
false
createDirectoryIfNotExists
=
(
p
ath
)
=>
createDirectoryIfNotExists
=
(
dirP
ath
)
=>
try
if
path
and
!
await
checkFileExists
(
p
ath
)
await
fs
.
promises
.
mkdir
(
p
ath
,
{
recursive
:
true
})
if
dirPath
and
!
await
checkFileExists
(
dirP
ath
)
await
fs
.
promises
.
mkdir
(
dirP
ath
,
{
recursive
:
true
})
catch
e
log
.
warn
(
"Failed to create directory
#{
path
}
:
#{
e
.
toString
()
}
"
)
...
...
@@ -603,8 +603,8 @@ init = () ->
settings
.
modules
.
deck_log
.
local
]
for
p
ath
in
mkdirList
await
createDirectoryIfNotExists
(
p
ath
)
for
dirP
ath
in
mkdirList
await
createDirectoryIfNotExists
(
dirP
ath
)
plugin_list
=
await
fs
.
promises
.
readdir
(
"./plugins"
)
for
plugin_filename
in
plugin_list
...
...
ygopro-server.js
View file @
aa69147c
...
...
@@ -94,11 +94,11 @@
}
};
createDirectoryIfNotExists
=
async
(
p
ath
)
=>
{
createDirectoryIfNotExists
=
async
(
dirP
ath
)
=>
{
var
e
;
try
{
if
(
path
&&
!
(
await
checkFileExists
(
p
ath
)))
{
return
(
await
fs
.
promises
.
mkdir
(
p
ath
,
{
if
(
dirPath
&&
!
(
await
checkFileExists
(
dirP
ath
)))
{
return
(
await
fs
.
promises
.
mkdir
(
dirP
ath
,
{
recursive
:
true
}));
}
...
...
@@ -297,7 +297,7 @@
};
init
=
async
function
()
{
var
AthleticChecker
,
DataManager
,
challonge_module_name
,
challonge_type
,
chat_color
,
config
,
cppversion
,
defaultConfig
,
default_data
,
dns
,
e
,
http_server
,
https
,
https_server
,
imported
,
j
,
l
,
len
,
len1
,
len2
,
m
,
mkdirList
,
options
,
pgClient
,
pg_client
,
pg_query
,
plugin_filename
,
plugin_list
,
plugin_path
,
postData
,
ref
;
var
AthleticChecker
,
DataManager
,
challonge_module_name
,
challonge_type
,
chat_color
,
config
,
cppversion
,
defaultConfig
,
default_data
,
d
irPath
,
d
ns
,
e
,
http_server
,
https
,
https_server
,
imported
,
j
,
l
,
len
,
len1
,
len2
,
m
,
mkdirList
,
options
,
pgClient
,
pg_client
,
pg_query
,
plugin_filename
,
plugin_list
,
plugin_path
,
postData
,
ref
;
await
createDirectoryIfNotExists
(
"
./config
"
);
await
importOldConfig
();
defaultConfig
=
(
await
loadJSONAsync
(
'
./data/default_config.json
'
));
...
...
@@ -770,8 +770,8 @@
}
mkdirList
=
[
"
./plugins
"
,
settings
.
modules
.
tournament_mode
.
deck_path
,
settings
.
modules
.
tournament_mode
.
replay_path
,
settings
.
modules
.
tournament_mode
.
log_save_path
,
settings
.
modules
.
deck_log
.
local
];
for
(
l
=
0
,
len1
=
mkdirList
.
length
;
l
<
len1
;
l
++
)
{
p
ath
=
mkdirList
[
l
];
await
createDirectoryIfNotExists
(
p
ath
);
dirP
ath
=
mkdirList
[
l
];
await
createDirectoryIfNotExists
(
dirP
ath
);
}
plugin_list
=
(
await
fs
.
promises
.
readdir
(
"
./plugins
"
));
for
(
m
=
0
,
len2
=
plugin_list
.
length
;
m
<
len2
;
m
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment