File src/filelist.c changed (mode: 100644) (index 3962152e2..1cf638cfc) |
... |
... |
leave_invalid_dir(FileView *view, char *path) |
912 |
912 |
* The *directory passed to change_directory() cannot be modified. |
* The *directory passed to change_directory() cannot be modified. |
913 |
913 |
* Symlink directories require an absolute path |
* Symlink directories require an absolute path |
914 |
914 |
* |
* |
915 |
|
* Returns 0 if there were no errors. |
|
|
915 |
|
* Returns: |
|
916 |
|
* -1 if there were errors. |
|
917 |
|
* 0 if directory successfully changed and we didn't leave FUSE mount |
|
918 |
|
* directory. |
|
919 |
|
* 1 if directory successfully changed and we left FUSE mount directory. |
916 |
920 |
*/ |
*/ |
917 |
921 |
int |
int |
918 |
922 |
change_directory(FileView *view, const char *directory) |
change_directory(FileView *view, const char *directory) |
|
... |
... |
change_directory(FileView *view, const char *directory) |
993 |
997 |
change_directory(view, runner->source_file_dir); |
change_directory(view, runner->source_file_dir); |
994 |
998 |
char *filen = runner->source_file_name; |
char *filen = runner->source_file_name; |
995 |
999 |
filen += strlen(runner->source_file_dir) + 1; |
filen += strlen(runner->source_file_dir) + 1; |
|
1000 |
|
load_dir_list(view, 0); |
996 |
1001 |
found = find_file_pos_in_list(view, filen); |
found = find_file_pos_in_list(view, filen); |
997 |
1002 |
moveto_list_pos(view, found); |
moveto_list_pos(view, found); |
998 |
1003 |
free(runner); |
free(runner); |
999 |
|
return 0; |
|
|
1004 |
|
return 1; |
1000 |
1005 |
} |
} |
1001 |
1006 |
} |
} |
1002 |
1007 |
|
|
File src/fileops.c changed (mode: 100644) (index 037ad4b21..62d8d02a2) |
... |
... |
cd_updir(FileView *view) |
275 |
275 |
get_last_path_component(view->curr_dir, dir_name); |
get_last_path_component(view->curr_dir, dir_name); |
276 |
276 |
strcat(dir_name, "/"); |
strcat(dir_name, "/"); |
277 |
277 |
|
|
278 |
|
change_directory(view, "../"); |
|
279 |
|
load_dir_list(view, 0); |
|
280 |
|
|
|
281 |
|
moveto_list_pos(view, find_file_pos_in_list(view, dir_name)); |
|
|
278 |
|
if(change_directory(view, "../") != 1) |
|
279 |
|
{ |
|
280 |
|
load_dir_list(view, 0); |
|
281 |
|
moveto_list_pos(view, find_file_pos_in_list(view, dir_name)); |
|
282 |
|
} |
282 |
283 |
} |
} |
283 |
284 |
|
|
284 |
285 |
void |
void |