File src/fileops.c changed (mode: 100644) (index 8992eb9c5..4ec37773c) |
... |
... |
make_dirs(FileView *view, char **names, int count, int create_parent) |
3566 |
3566 |
{ |
{ |
3567 |
3567 |
char buf[COMMAND_GROUP_INFO_LEN + 1]; |
char buf[COMMAND_GROUP_INFO_LEN + 1]; |
3568 |
3568 |
int i; |
int i; |
|
3569 |
|
int n; |
3569 |
3570 |
void *cp = (void *)(long)create_parent; |
void *cp = (void *)(long)create_parent; |
3570 |
3571 |
|
|
3571 |
3572 |
snprintf(buf, sizeof(buf), "mkdir in %s: ", |
snprintf(buf, sizeof(buf), "mkdir in %s: ", |
|
... |
... |
make_dirs(FileView *view, char **names, int count, int create_parent) |
3573 |
3574 |
|
|
3574 |
3575 |
get_group_file_list(names, count, buf); |
get_group_file_list(names, count, buf); |
3575 |
3576 |
cmd_group_begin(buf); |
cmd_group_begin(buf); |
|
3577 |
|
n = 0; |
3576 |
3578 |
for(i = 0; i < count; i++) |
for(i = 0; i < count; i++) |
3577 |
3579 |
{ |
{ |
3578 |
3580 |
char full[PATH_MAX]; |
char full[PATH_MAX]; |
3579 |
3581 |
snprintf(full, sizeof(full), "%s/%s", view->curr_dir, names[i]); |
snprintf(full, sizeof(full), "%s/%s", view->curr_dir, names[i]); |
3580 |
3582 |
if(perform_operation(OP_MKDIR, cp, full, NULL) == 0) |
if(perform_operation(OP_MKDIR, cp, full, NULL) == 0) |
|
3583 |
|
{ |
3581 |
3584 |
add_operation(OP_MKDIR, cp, NULL, full, ""); |
add_operation(OP_MKDIR, cp, NULL, full, ""); |
|
3585 |
|
n++; |
|
3586 |
|
} |
|
3587 |
|
else if(i == 0) |
|
3588 |
|
{ |
|
3589 |
|
i--; |
|
3590 |
|
names++; |
|
3591 |
|
count--; |
|
3592 |
|
} |
3582 |
3593 |
} |
} |
3583 |
3594 |
cmd_group_end(); |
cmd_group_end(); |
3584 |
3595 |
|
|
3585 |
|
go_to_first_file(view, names, count); |
|
|
3596 |
|
if(count > 0) |
|
3597 |
|
go_to_first_file(view, names, count); |
|
3598 |
|
|
|
3599 |
|
status_bar_messagef("%d directorie%s created", n, (n == 1) ? "" : "s"); |
3586 |
3600 |
} |
} |
3587 |
3601 |
|
|
3588 |
3602 |
int |
int |