Major changes on API
Former-commit-id: 096988e1e40835be12cdbfc685e58c3a6faf7d54 [formerly c687ad9725e93f7ee34bcef0193bafb6643feb62] [formerly cf70ea15f14f4f849a8f449438ffdb8ab5b60f6e [formerly 1f7974de38e624173d9418bddaacae53414b7db1]] Former-commit-id: 85e35a88d9d46c2a6fe3598b902ad8ab86019c05 [formerly f38667fb170916541f62b14389b6296e8da2580e] Former-commit-id: 5addfd36ad865a8644f659e5140453e1fdada62d
This commit is contained in:
@@ -94,7 +94,6 @@ func parse(c *caddy.Controller) ([]*config, error) {
|
||||
|
||||
if len(args) > 0 {
|
||||
m.baseURL = args[0]
|
||||
m.webDavURL = "/webdav"
|
||||
m.SetBaseURL(args[0])
|
||||
}
|
||||
|
||||
@@ -108,13 +107,6 @@ func parse(c *caddy.Controller) ([]*config, error) {
|
||||
if m.AfterSave, err = makeCommand(c, m); err != nil {
|
||||
return configs, err
|
||||
}
|
||||
case "webdav":
|
||||
if !c.NextArg() {
|
||||
return configs, c.ArgErr()
|
||||
}
|
||||
|
||||
m.webDavURL = "c.Val()"
|
||||
m.SetWebDavURL(c.Val())
|
||||
case "show":
|
||||
if !c.NextArg() {
|
||||
return configs, c.ArgErr()
|
||||
@@ -251,7 +243,7 @@ func makeCommand(c *caddy.Controller, m *config) (Command, error) {
|
||||
|
||||
fn = func(r *http.Request, c *FileManager, u *User) error {
|
||||
path := strings.Replace(r.URL.Path, m.baseURL+m.webDavURL, "", 1)
|
||||
path = u.Scope() + "/" + path
|
||||
path = u.Scope + "/" + path
|
||||
path = filepath.Clean(path)
|
||||
|
||||
for i := range args {
|
||||
|
||||
Reference in New Issue
Block a user