File ChangeLog changed (mode: 100644) (index 49e7e7af1..adb9ae79f) |
3 |
3 |
Fixed :clone and :copy refusing to copy broken symbolic links, even though C |
Fixed :clone and :copy refusing to copy broken symbolic links, even though C |
4 |
4 |
and p keys copy them. |
and p keys copy them. |
5 |
5 |
|
|
|
6 |
|
Fixed C key not checking readability of a single unselected file, like |
|
7 |
|
:clone does. |
|
8 |
|
|
6 |
9 |
0.9 to 0.9.1-beta |
0.9 to 0.9.1-beta |
7 |
10 |
|
|
8 |
11 |
Added "inode" sorting key, which sorts entries by inode number. Thanks to |
Added "inode" sorting key, which sorts entries by inode number. Thanks to |
File src/fops_common.c changed (mode: 100644) (index 95b6218c7..ec234a29c) |
... |
... |
fops_get_dst_name(const char src_path[], int from_trash) |
675 |
675 |
} |
} |
676 |
676 |
|
|
677 |
677 |
int |
int |
678 |
|
fops_can_read_selected_files(view_t *view) |
|
|
678 |
|
fops_can_read_marked_files(view_t *view) |
679 |
679 |
{ |
{ |
680 |
680 |
dir_entry_t *entry; |
dir_entry_t *entry; |
681 |
681 |
|
|
|
... |
... |
fops_can_read_selected_files(view_t *view) |
685 |
685 |
} |
} |
686 |
686 |
|
|
687 |
687 |
entry = NULL; |
entry = NULL; |
688 |
|
while(iter_selected_entries(view, &entry)) |
|
|
688 |
|
while(iter_marked_entries(view, &entry)) |
689 |
689 |
{ |
{ |
690 |
690 |
char full_path[PATH_MAX + 1]; |
char full_path[PATH_MAX + 1]; |
691 |
691 |
get_full_path_of(entry, sizeof(full_path), full_path); |
get_full_path_of(entry, sizeof(full_path), full_path); |
File src/fops_common.h changed (mode: 100644) (index 20c6cb522..3fb1063a0) |
... |
... |
void fops_progress_msg(const char text[], int ready, int total); |
133 |
133 |
* name. */ |
* name. */ |
134 |
134 |
const char * fops_get_dst_name(const char src_path[], int from_trash); |
const char * fops_get_dst_name(const char src_path[], int from_trash); |
135 |
135 |
|
|
136 |
|
/* Checks that all selected files can be read. Returns non-zero if so, |
|
137 |
|
* otherwise zero is returned. */ |
|
138 |
|
int fops_can_read_selected_files(struct view_t *view); |
|
|
136 |
|
/* Checks that all marked files can be read. Returns non-zero if so, otherwise |
|
137 |
|
* zero is returned. */ |
|
138 |
|
int fops_can_read_marked_files(struct view_t *view); |
139 |
139 |
|
|
140 |
140 |
/* Checks path argument and resolves target directory either to the argument or |
/* Checks path argument and resolves target directory either to the argument or |
141 |
141 |
* current directory of the view. Returns non-zero if value of the path was |
* current directory of the view. Returns non-zero if value of the path was |
File tests/fileops/clone_files.c changed (mode: 100644) (index 935ccb536..83200e072) |
1 |
1 |
#include <stic.h> |
#include <stic.h> |
2 |
2 |
|
|
|
3 |
|
#include <sys/stat.h> /* chmod() */ |
3 |
4 |
#include <unistd.h> /* chdir() symlink() unlink() */ |
#include <unistd.h> /* chdir() symlink() unlink() */ |
4 |
5 |
|
|
5 |
6 |
#include "../../src/cfg/config.h" |
#include "../../src/cfg/config.h" |
|
... |
... |
TEST(cloning_of_broken_symlink, IF(not_windows)) |
154 |
155 |
assert_success(unlink("broken-link")); |
assert_success(unlink("broken-link")); |
155 |
156 |
} |
} |
156 |
157 |
|
|
|
158 |
|
TEST(cloning_is_aborted_if_we_can_not_read_a_file, IF(not_windows)) |
|
159 |
|
{ |
|
160 |
|
create_empty_file("can-read"); |
|
161 |
|
create_empty_file("can-not-read"); |
|
162 |
|
assert_success(chmod("can-not-read", 0000)); |
|
163 |
|
populate_dir_list(&lwin, 0); |
|
164 |
|
|
|
165 |
|
lwin.dir_entry[0].marked = 1; |
|
166 |
|
lwin.dir_entry[1].marked = 1; |
|
167 |
|
assert_int_equal(0, fops_clone(&lwin, NULL, 0, 0, 1)); |
|
168 |
|
|
|
169 |
|
assert_success(unlink("can-read")); |
|
170 |
|
assert_success(unlink("can-not-read")); |
|
171 |
|
} |
|
172 |
|
|
157 |
173 |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ |
158 |
174 |
/* vim: set cinoptions+=t0 : */ |
/* vim: set cinoptions+=t0 : */ |
File tests/fileops/cpmv_files.c changed (mode: 100644) (index 9df901a8d..fb269ac2c) |
1 |
1 |
#include <stic.h> |
#include <stic.h> |
2 |
2 |
|
|
|
3 |
|
#include <sys/stat.h> /* chmod() */ |
3 |
4 |
#include <unistd.h> /* chdir() unlink() */ |
#include <unistd.h> /* chdir() unlink() */ |
4 |
5 |
|
|
5 |
6 |
#include <stddef.h> /* NULL */ |
#include <stddef.h> /* NULL */ |
|
... |
... |
TEST(parent_overwrite_is_prevented_on_file_move) |
311 |
312 |
check_directory_clash(0, CMLO_MOVE); |
check_directory_clash(0, CMLO_MOVE); |
312 |
313 |
} |
} |
313 |
314 |
|
|
|
315 |
|
TEST(copying_is_aborted_if_we_can_not_read_a_file, IF(not_windows)) |
|
316 |
|
{ |
|
317 |
|
create_empty_file("can-read"); |
|
318 |
|
create_empty_file("can-not-read"); |
|
319 |
|
assert_success(chmod("can-not-read", 0000)); |
|
320 |
|
populate_dir_list(&lwin, 0); |
|
321 |
|
|
|
322 |
|
lwin.dir_entry[0].marked = 1; |
|
323 |
|
lwin.dir_entry[1].marked = 1; |
|
324 |
|
assert_int_equal(0, fops_cpmv(&lwin, NULL, 0, CMLO_COPY, 0)); |
|
325 |
|
|
|
326 |
|
assert_success(unlink("can-read")); |
|
327 |
|
assert_success(unlink("can-not-read")); |
|
328 |
|
} |
|
329 |
|
|
314 |
330 |
static void |
static void |
315 |
331 |
check_directory_clash(int parent_to_child, CopyMoveLikeOp op) |
check_directory_clash(int parent_to_child, CopyMoveLikeOp op) |
316 |
332 |
{ |
{ |