File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -153,12 +153,12 @@ func MigratePost(ctx *context.Context) {
153153 case addrErr .IsURLError :
154154 ctx .RenderWithErr (ctx .Tr ("form.url_error" ), tpl , & form )
155155 case addrErr .IsPermissionDenied :
156- if len ( addrErr .PrivateNet ) == 0 {
157- ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied_private_ip " ), tpl , & form )
158- } else if ! addrErr .LocalPath {
156+ if addrErr .LocalPath {
157+ ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied " ), tpl , & form )
158+ } else if len ( addrErr .PrivateNet ) == 0 {
159159 ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied_blocked" ), tpl , & form )
160160 } else {
161- ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied " ), tpl , & form )
161+ ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied_private_ip " ), tpl , & form )
162162 }
163163 case addrErr .IsInvalidPath :
164164 ctx .RenderWithErr (ctx .Tr ("repo.migrate.invalid_local_path" ), tpl , & form )
Original file line number Diff line number Diff line change @@ -178,12 +178,12 @@ func SettingsPost(ctx *context.Context) {
178178 case addrErr .IsURLError :
179179 ctx .RenderWithErr (ctx .Tr ("form.url_error" ), tplSettingsOptions , & form )
180180 case addrErr .IsPermissionDenied :
181- if len ( addrErr .PrivateNet ) == 0 {
182- ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied_private_ip " ), tplSettingsOptions , & form )
183- } else if ! addrErr .LocalPath {
181+ if addrErr .LocalPath {
182+ ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied " ), tplSettingsOptions , & form )
183+ } else if len ( addrErr .PrivateNet ) == 0 {
184184 ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied_blocked" ), tplSettingsOptions , & form )
185185 } else {
186- ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied " ), tplSettingsOptions , & form )
186+ ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied_private_ip " ), tplSettingsOptions , & form )
187187 }
188188 case addrErr .IsInvalidPath :
189189 ctx .RenderWithErr (ctx .Tr ("repo.migrate.invalid_local_path" ), tplSettingsOptions , & form )
You can’t perform that action at this time.
0 commit comments