This repository was archived by the owner on Oct 30, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,13 @@ exports.validateAllocation = function(conf, callback) {
8181 const self = this ;
8282
8383 if ( ! self . _isValidStorageAllocationFormat ( conf . storageAllocation ) ) {
84- return callback (
85- new Error ( 'Invalid storage size specified: ' + conf . storageAllocation )
86- ) ;
84+ if ( isNaN ( conf . storageAllocation ) ) {
85+ return callback (
86+ new Error ( 'Invalid storage size specified: ' + conf . storageAllocation )
87+ ) ;
88+ }
89+
90+ conf . storageAllocation = conf . storageAllocation . toString ( ) + 'B' ;
8791 }
8892
8993 self . getFreeSpace ( conf . storagePath , function ( err , free ) {
@@ -95,7 +99,7 @@ exports.validateAllocation = function(conf, callback) {
9599 }
96100
97101 if ( allocatedSpace > free + usedSpaceBytes ) {
98- return callback ( new Error ( 'Invalid storage size: ' +
102+ return callback ( new Error ( 'Invalid storage size: ' +
99103 - ( free + usedSpaceBytes - allocatedSpace ) + ' bytes missing' ) ) ;
100104 }
101105
Original file line number Diff line number Diff line change 11{
22 "name" : " storjshare-daemon" ,
3- "version" : " 3.5.3 " ,
3+ "version" : " 3.5.4 " ,
44 "description" : " daemon + process manager for sharing space on the storj network" ,
55 "main" : " index.js" ,
66 "bin" : {
You can’t perform that action at this time.
0 commit comments