summaryrefslogtreecommitdiffstats
path: root/src/dirn.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-12-03 10:05:09 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2011-12-03 10:05:09 +0100
commitebc6574a5f248c44c445ae25d9f9185f354d9a7b (patch)
tree7284798442270a5387a7881938e909b0de7beeae /src/dirn.c
parenta9b52c72aee379114ad55e12e19b384ec8ee18fc (diff)
Display "No file selected" if no file have been selected for the copy operation
Diffstat (limited to 'src/dirn.c')
-rw-r--r--src/dirn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dirn.c b/src/dirn.c
index e8a7bb5..2d33f09 100644
--- a/src/dirn.c
+++ b/src/dirn.c
@@ -68,7 +68,7 @@ static long int dir_aff_ncurses(disk_t *disk, const partition_t *partition, dir_
int pos_num=0;
file_data_t *pos=dir_list;
int old_LINES=LINES;
- int status=FILE_STATUS_MARKED;
+ unsigned int status=FILE_STATUS_MARKED;
aff_copy(window);
wmove(window,3,0);
aff_part(window, AFF_PART_ORDER|AFF_PART_STATUS, disk, partition);
@@ -457,6 +457,8 @@ static long int dir_aff_ncurses(disk_t *disk, const partition_t *partition, dir_
wbkgdset(window,' ' | A_BOLD | COLOR_PAIR(2));
if(copy_bad > 0)
wprintw(window,"Copy done! (Failed to copy some files)");
+ else if(copy_ok == 0)
+ wprintw(window,"No file selected");
else
wprintw(window,"Copy done!");
}