Skip to content

Commit

Permalink
support setting different storage paths for different packages
Browse files Browse the repository at this point in the history
fixes #35
  • Loading branch information
rlidwka committed Jan 13, 2014
1 parent dadbf3a commit 6c25875
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/config_def.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/local-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 6c25875

Please sign in to comment.