15 - while ((c = getch()) != ERR) |
16 - while ((c = getch()) != ERR) |
16 + while ((c = getch()) != NCURSES_ERR) |
17 + while ((c = getch()) != NCURSES_ERR) |
17 m_slotPressed(c); |
18 m_slotPressed(c); |
18 } |
19 } |
19 |
20 |
20 --- rtorrent-0.8.2/src/input/path_input.cc.orig 2008-05-08 00:19:11.000000000 +1200 |
21 --- rtorrent-0.8.2/src/input/path_input.cc.orig 2008-05-07 05:19:11.000000000 -0700 |
21 +++ rtorrent-0.8.2/src/input/path_input.cc 2008-05-10 18:46:38.159258850 +1200 |
22 +++ rtorrent-0.8.2/src/input/path_input.cc 2015-02-01 12:12:30.800473449 -0800 |
22 @@ -42,7 +42,8 @@ |
23 @@ -42,7 +42,8 @@ |
23 #include <rak/path.h> |
24 #include <rak/path.h> |
24 |
25 |
25 #include <sys/types.h> |
26 #include <sys/types.h> |
26 -#include <sys/dir.h> |
27 -#include <sys/dir.h> |
27 +#include <sys/dirent.h> |
28 +#include <sys/dirent.h> |
28 +#include <sys/stat.h> |
29 +#include <sys/stat.h> |
29 |
30 |
30 #include "path_input.h" |
31 #include "path_input.h" |
31 |
32 |
32 @@ -71,9 +72,12 @@ |
33 @@ -71,10 +72,13 @@ |
33 } |
34 } |
34 |
35 |
35 struct _transform_filename { |
36 struct _transform_filename { |
36 + struct stat s; |
37 + struct stat s; |
37 void operator () (utils::directory_entry& entry) { |
38 void operator () (utils::directory_entry& entry) { |
38 - if (entry.d_type == DT_DIR) |
39 - if (entry.d_type == DT_DIR) |
39 + stat(entry.d_name.c_str(), &s); |
40 + stat(entry.d_name.c_str(), &s); |
40 + if (s.st_mode & S_IFDIR) { |
41 + if (s.st_mode & S_IFDIR) { |
41 entry.d_name += '/'; |
42 entry.d_name += '/'; |
42 + } |
|
43 } |
43 } |
|
44 + } |
44 }; |
45 }; |
|
46 |
|
47 void |
|
48 @@ -109,7 +113,9 @@ |
|
49 mark_dirty(); |
|
50 |
|
51 // Only emit if there are more than one option. |
|
52 - m_showNext = ++utils::Directory::iterator(r.first) != r.second; |
|
53 + utils::Directory::iterator itr(r.first); |
|
54 + ++itr; |
|
55 + m_showNext = itr != r.second; |
|
56 |
|
57 if (m_showNext) |
|
58 m_signalShowRange.emit(r.first, r.second); |
45 |
59 |
46 --- rtorrent-0.8.2/src/utils/directory.h.orig 2008-05-08 00:19:11.000000000 +1200 |
60 --- rtorrent-0.8.2/src/utils/directory.h.orig 2008-05-08 00:19:11.000000000 +1200 |
47 +++ rtorrent-0.8.2/src/utils/directory.h 2008-05-10 18:40:49.485871875 +1200 |
61 +++ rtorrent-0.8.2/src/utils/directory.h 2008-05-10 18:40:49.485871875 +1200 |
48 @@ -48,9 +48,7 @@ |
62 @@ -48,9 +48,7 @@ |
49 bool is_file() const { return true; } |
63 bool is_file() const { return true; } |