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
521a84b3
Commit
521a84b3
authored
2 years ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
min_dspace is now in bytes, not kilobytes, so deal with that
parent
cf15ad52
No related branches found
No related tags found
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Pipeline
#3773
passed
2 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sbbs3/js_file_area.c
+2
-2
2 additions, 2 deletions
src/sbbs3/js_file_area.c
src/sbbs3/upload.cpp
+2
-2
2 additions, 2 deletions
src/sbbs3/upload.cpp
with
4 additions
and
4 deletions
src/sbbs3/js_file_area.c
+
2
−
2
View file @
521a84b3
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#ifdef BUILD_JSDOCS
#ifdef BUILD_JSDOCS
static
char
*
file_area_prop_desc
[]
=
{
static
char
*
file_area_prop_desc
[]
=
{
"minimum amount of available disk space (in
kilo
bytes) required for user uploads to be allowed"
"minimum amount of available disk space (in bytes) required for user uploads to be allowed"
,
"file area settings (bitfield) - see <tt>FM_*</tt> in <tt>sbbsdefs.js</tt> for details"
,
"file area settings (bitfield) - see <tt>FM_*</tt> in <tt>sbbsdefs.js</tt> for details"
,
"web file virtual path prefix <i>(introduced in v3.19c)</i>"
,
"web file virtual path prefix <i>(introduced in v3.19c)</i>"
,
NULL
,
NULL
...
@@ -216,7 +216,7 @@ JSBool js_file_area_resolve(JSContext* cx, JSObject* areaobj, jsid id)
...
@@ -216,7 +216,7 @@ JSBool js_file_area_resolve(JSContext* cx, JSObject* areaobj, jsid id)
if
(
name
==
NULL
||
strcmp
(
name
,
"min_diskspace"
)
==
0
)
{
if
(
name
==
NULL
||
strcmp
(
name
,
"min_diskspace"
)
==
0
)
{
if
(
name
)
if
(
name
)
free
(
name
);
free
(
name
);
val
=
UINT
_TO_JSVAL
(
p
->
cfg
->
min_dspace
);
val
=
DOUBLE
_TO_JSVAL
(
(
jsdouble
)
p
->
cfg
->
min_dspace
);
JS_DefineProperty
(
cx
,
areaobj
,
"min_diskspace"
,
val
,
NULL
,
NULL
,
JSPROP_ENUMERATE
);
JS_DefineProperty
(
cx
,
areaobj
,
"min_diskspace"
,
val
,
NULL
,
NULL
,
JSPROP_ENUMERATE
);
if
(
name
)
if
(
name
)
return
(
JS_TRUE
);
return
(
JS_TRUE
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/upload.cpp
+
2
−
2
View file @
521a84b3
...
@@ -249,9 +249,9 @@ bool sbbs_t::upload(uint dirnum)
...
@@ -249,9 +249,9 @@ bool sbbs_t::upload(uint dirnum)
/* get free disk space */
/* get free disk space */
space
=
getfreediskspace
(
path
,
1024
);
space
=
getfreediskspace
(
path
,
1024
);
if
(
space
<
(
ulong
)
cfg
.
min_dspace
)
{
if
(
space
<
(
ulong
)
(
cfg
.
min_dspace
/
1024
)
)
{
bputs
(
text
[
LowDiskSpace
]);
bputs
(
text
[
LowDiskSpace
]);
lprintf
(
LOG_ERR
,
"Diskspace is low: %s (%lu
kilobytes
)"
,
path
,
space
);
lprintf
(
LOG_ERR
,
"Diskspace is low: %s (%lu
KB
)"
,
path
,
space
);
if
(
!
dir_op
(
dirnum
))
if
(
!
dir_op
(
dirnum
))
return
(
false
);
return
(
false
);
}
}
...
...
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