Amiga systems use / and not .. for parent dir. Takes this into account...

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@498 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2009-01-20 18:33:50 +00:00
parent fec8d023e9
commit 0f2d642847
5 changed files with 31 additions and 10 deletions

11
files.c
View File

@@ -107,9 +107,9 @@ char * Nom_formate(char * Nom, int Type)
int Autre_curseur;
int Pos_DernierPoint;
if (strcmp(Nom,"..")==0)
if (strcmp(Nom,PARENT_DIR)==0)
{
strcpy(Resultat,".. ");
strcpy(Resultat,"<-PARENT DIR");
}
else if (Nom[0]=='.' || Type==2)
{
@@ -239,7 +239,7 @@ void Lire_liste_des_fichiers(byte Format_demande)
// et que l'élément trouvé est un répertoire
if( S_ISDIR(Infos_enreg.st_mode) &&
// et que c'est ".."
(!strcmp(Enreg->d_name, "..") ||
(!strcmp(Enreg->d_name, PARENT_DIR) ||
// ou qu'il n'est pas caché
Config.Lire_les_repertoires_caches ||
!isHidden(Enreg)))
@@ -261,6 +261,11 @@ void Lire_liste_des_fichiers(byte Format_demande)
}
}
#if defined(__MORPHOS__) || defined (__amigaos4__) || defined(__amigaos__)
Ajouter_element_a_la_liste("/",1); // on amiga systems, / means parent. And there is no ..
Liste_Nb_Repertoires ++;
#endif
closedir(Repertoire_Courant);
free(Chemin_courant);