From 12501833dfc48ddec0bd678b7d30687a4a0b5856 Mon Sep 17 00:00:00 2001 From: mazzearos Date: Thu, 2 Aug 2012 18:26:04 +0000 Subject: [PATCH] Two more fixes for AROS to avoid paths like volume:/file. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1975 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/io.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/io.c b/src/io.c index dd8e068a..3697e926 100644 --- a/src/io.c +++ b/src/io.c @@ -362,7 +362,11 @@ void For_each_file(const char * directory_name, void Callback(const char *)) current_directory=opendir(directory_name); if(current_directory == NULL) return; // Répertoire invalide ... filename_position = strlen(full_filename); +#if defined(__AROS__) + if (filename_position==0 || (strcmp(full_filename+filename_position-1,PATH_SEPARATOR) && strcmp(full_filename+filename_position-1,":"))) +#else if (filename_position==0 || strcmp(full_filename+filename_position-1,PATH_SEPARATOR)) +#endif { strcat(full_filename, PATH_SEPARATOR); filename_position = strlen(full_filename); @@ -392,7 +396,11 @@ void For_each_directory_entry(const char * directory_name, void Callback(const c current_directory=opendir(full_filename); if(current_directory == NULL) return; // Répertoire invalide ... filename_position = strlen(full_filename); +#if defined(__AROS__) + if (filename_position==0 || (strcmp(full_filename+filename_position-1,PATH_SEPARATOR) && strcmp(full_filename+filename_position-1,":"))) +#else if (filename_position==0 || strcmp(full_filename+filename_position-1,PATH_SEPARATOR)) +#endif { strcat(full_filename, PATH_SEPARATOR); filename_position = strlen(full_filename);