Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
0bf78839
Commit
0bf78839
authored
4 years ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Address installation issues (e.g. set the "native" settings flag)
parent
62c1a3f3
No related branches found
No related tags found
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/localcopy.js
+11
-9
11 additions, 9 deletions
exec/localcopy.js
with
11 additions
and
9 deletions
exec/localcopy.js
+
11
−
9
View file @
0bf78839
// $Id: localcopy.js,v 1.3 2020/05/14 01:25:32 rswindell Exp $
// A simple script that just copies a file on the local/server side
// Install using 'jsexec localcopy.js install'
// Or manually in SCFG->File Options->File Transfer Prot
c
ools:
// Or manually in SCFG->File Options->File Transfer Proto
c
ols:
// Mnemonic (Command Key) L
// Protocol Name Local
// Access Requirements SYSOP
...
...
@@ -13,9 +11,11 @@
// Batch Upload Command Line ?localcopy send %g
// Batch Download Command Line ?localcopy recv %s
// Bi-dir Command Line
// Native (32-bit) Executable No
// Supports DSZLOG No
// Socket I/O No
// Native Executable/Script Yes
// Supports DSZLOG No
// Socket I/O No
require
(
"
sbbsdefs.js
"
,
"
PROT_NATIVE
"
);
// Copy a file, confirm over-write, preserving original date/time stamp
function
fcopy
(
src
,
dest
)
...
...
@@ -41,11 +41,12 @@ function main(cmd) {
switch
(
cmd
)
{
case
'
install
'
:
case
'
-install
'
:
var
cnflib
=
load
({},
"
cnflib.js
"
);
var
file_cnf
=
cnflib
.
read
(
"
file.cnf
"
);
if
(
!
file_cnf
)
{
alert
(
"
Failed to read file.cnf
"
);
return
(
-
1
);
exit
(
-
1
);
}
file_cnf
.
prot
.
push
({
key
:
'
L
'
...
...
@@ -55,13 +56,14 @@ function main(cmd) {
,
batulcmd
:
'
?localcopy send %g
'
,
batdlcmd
:
'
?localcopy recv %s
'
,
ars
:
'
SYSOP
'
,
settings
:
PROT_NATIVE
});
if
(
!
cnflib
.
write
(
"
file.cnf
"
,
undefined
,
file_cnf
))
{
alert
(
"
Failed to write file.cnf
"
);
return
(
-
1
);
exit
(
-
1
);
}
return
(
0
);
exit
(
0
);
case
'
send
'
:
if
(
file_isdir
(
argv
[
1
]))
{
/* batch upload */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment