diff --git a/lib/config_def.yaml b/lib/config_def.yaml index aa6a2c0e7..e2d93616a 100644 --- a/lib/config_def.yaml +++ b/lib/config_def.yaml @@ -23,11 +23,13 @@ uplinks: #maxage: 120 packages: - # uncomment this for packages with "local-" prefix to be available + # uncomment this for packages with "local-" prefix to be available # for admin only, it's a recommended way of handling private packages #'local-*': # allow_access: admin # allow_publish: admin + # # you can override storage directory for a group of packages this way: + # storage: 'local_storage' '*': # allow all users to read packages ('all' is a keyword) diff --git a/lib/local-storage.js b/lib/local-storage.js index ac3f61de1..1c4fc66a1 100644 --- a/lib/local-storage.js +++ b/lib/local-storage.js @@ -502,7 +502,7 @@ Storage.prototype.storage = function(package) { Path.join( Path.resolve( Path.dirname(this.config.self_path), - this.config.storage + this.config.get_package_setting(package, 'storage') || this.config.storage ), package )