Index: openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-icanuse-procs.tcl,v diff -u -r1.1.2.32 -r1.1.2.33 --- openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl 5 Jan 2022 14:00:20 -0000 1.1.2.32 +++ openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl 5 Jan 2022 14:16:48 -0000 1.1.2.33 @@ -263,11 +263,23 @@ Partial backward compatibility function of "ns_baseunit ?-size size? ?-time time?" Only the time unit part is partially implemented, - therefore, icanuse is not set for that feature. + therefore, icanuse is not set for that feature, + since one should be able to trust blindly on this. } { if {[info exists size]} { - error "partial implementation of ns_baseunit does not support -size option" + # + # Rough approximation for AOLserver and older versions of NaviServer. + # + if {![string is integer -strict $size]} { + if {[regexp {^(\d+)([mk])b} [string tolower $specifiedSize] . amount unit]} { + set multipliers {k 1024 m 1048576} + set size [expr {[dict get $multipliers $unit] * $amount}] + } else { + error "invalid size specification '$size'" + } + } + return $size } if {![string is integer -strict $time]} { if {[regexp {^(\d+)d$} $time _ t]} {