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) {
153
153
case addrErr .IsURLError :
154
154
ctx .RenderWithErr (ctx .Tr ("form.url_error" ), tpl , & form )
155
155
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 {
159
159
ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied_blocked" ), tpl , & form )
160
160
} 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 )
162
162
}
163
163
case addrErr .IsInvalidPath :
164
164
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) {
178
178
case addrErr .IsURLError :
179
179
ctx .RenderWithErr (ctx .Tr ("form.url_error" ), tplSettingsOptions , & form )
180
180
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 {
184
184
ctx .RenderWithErr (ctx .Tr ("repo.migrate.permission_denied_blocked" ), tplSettingsOptions , & form )
185
185
} 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 )
187
187
}
188
188
case addrErr .IsInvalidPath :
189
189
ctx .RenderWithErr (ctx .Tr ("repo.migrate.invalid_local_path" ), tplSettingsOptions , & form )
You can’t perform that action at this time.
0 commit comments