Skip to content

Conversation

@membphis
Copy link
Member

@membphis membphis commented Aug 21, 2020

What this PR does / why we need it:

as title.

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible?

@membphis membphis requested a review from nic-chen August 21, 2020 09:09
@membphis
Copy link
Member Author

@nic-chen I think we can merge this PR now

@nic-chen
Copy link
Member

@nic-chen I think we can merge this PR now

ok,thanks. @membphis

@moonming do you have other suggestions ?

local prefix = ngx.config.prefix()

if conf_path then
local root = string.sub(conf_path, 1, 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use string.byte(conf_path, 1, 1), and compare it with ascii number.

local dir = string.sub(conf_path, 1, n)
local name = string.sub(conf_path, n + 1)
return dir, name
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to move the stuff above into two function: is_abs and split_path in a utility file so that other people can reuse it.

@nic-chen
Copy link
Member

@spacewander We urgently need this feature, I will merge it first, and will deal with the optimization items later. thank you very much.

@moonming moonming merged commit 9070a4f into apache:master Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants