read-only flag
Этот коммит содержится в:
родитель
46f0334111
Коммит
57164c8ca6
@ -370,7 +370,7 @@ int browse_key(int ch) {
|
||||
info_show = 0;
|
||||
break;
|
||||
case 'd':
|
||||
if(sel == NULL || sel == dirlist_parent)
|
||||
if(read_only || sel == NULL || sel == dirlist_parent)
|
||||
break;
|
||||
info_show = 0;
|
||||
if((t = dirlist_get(1)) == sel)
|
||||
|
@ -71,6 +71,8 @@ struct dir {
|
||||
|
||||
/* program state */
|
||||
extern int pstate;
|
||||
/* read-only flag */
|
||||
extern int read_only;
|
||||
/* minimum screen update interval when calculating, in ms */
|
||||
extern long update_delay;
|
||||
|
||||
|
@ -37,6 +37,7 @@ int pstate;
|
||||
|
||||
int min_rows = 17,
|
||||
min_cols = 60;
|
||||
int read_only = 0;
|
||||
long update_delay = 100,
|
||||
lastupdate = 999;
|
||||
|
||||
@ -118,6 +119,7 @@ char *argv_parse(int argc, char **argv) {
|
||||
for(j=1; j<len; j++)
|
||||
switch(argv[i][j]) {
|
||||
case 'x': calc_smfs = 1; break;
|
||||
case 'r': read_only = 1; break;
|
||||
case 'q': update_delay = 2000; break;
|
||||
case '?':
|
||||
case 'h':
|
||||
@ -126,6 +128,7 @@ char *argv_parse(int argc, char **argv) {
|
||||
printf(" -q Quiet mode, refresh interval 2 seconds\n");
|
||||
printf(" -v Print version\n");
|
||||
printf(" -x Same filesystem\n");
|
||||
printf(" -r Read only\n");
|
||||
printf(" --exclude PATTERN Exclude files that match PATTERN\n");
|
||||
printf(" -X, --exclude-from FILE Exclude files that match any pattern in FILE\n");
|
||||
exit(0);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user