mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Add comments
This commit is contained in:
parent
4c7fc6be69
commit
aa9c7bac23
|
@ -3244,6 +3244,7 @@ nochange:
|
||||||
goto nochange;
|
goto nochange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Confirm if app is CLI or GUI */
|
||||||
if (sel == SEL_OPEN || sel == SEL_LAUNCH) {
|
if (sel == SEL_OPEN || sel == SEL_LAUNCH) {
|
||||||
r = get_input("press 'c' for cli mode");
|
r = get_input("press 'c' for cli mode");
|
||||||
(r == 'c') ? (r = F_NORMAL) : (r = F_NOWAIT | F_NOTRACE);
|
(r == 'c') ? (r = F_NORMAL) : (r = F_NOWAIT | F_NOTRACE);
|
||||||
|
@ -3297,6 +3298,7 @@ nochange:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Complete OPEN, LAUNCH, ARCHIVE operations */
|
||||||
if (sel != SEL_NEW && sel != SEL_RENAME) {
|
if (sel != SEL_NEW && sel != SEL_RENAME) {
|
||||||
/* Continue in navigate-as-you-type mode, if enabled */
|
/* Continue in navigate-as-you-type mode, if enabled */
|
||||||
if (cfg.filtermode)
|
if (cfg.filtermode)
|
||||||
|
@ -3319,12 +3321,13 @@ nochange:
|
||||||
/* Check if another file with same name exists */
|
/* Check if another file with same name exists */
|
||||||
if (faccessat(fd, tmp, F_OK, AT_SYMLINK_NOFOLLOW) != -1) {
|
if (faccessat(fd, tmp, F_OK, AT_SYMLINK_NOFOLLOW) != -1) {
|
||||||
if (sel == SEL_RENAME) {
|
if (sel == SEL_RENAME) {
|
||||||
/* File with the same name exists */
|
/* Overwrite file with same name? */
|
||||||
if (get_input("press 'y' to overwrite") != 'y') {
|
if (get_input("press 'y' to overwrite") != 'y') {
|
||||||
close(fd);
|
close(fd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
/* Do nothing in case of NEW */
|
||||||
close(fd);
|
close(fd);
|
||||||
printmsg("entry exists");
|
printmsg("entry exists");
|
||||||
goto nochange;
|
goto nochange;
|
||||||
|
|
Loading…
Reference in a new issue