From: curt Date: Mon, 22 Mar 2004 02:17:41 +0000 (+0000) Subject: Frederic Bouvier: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9fe889e404c035a4a0af06e5a0b7c5dede079bf5;p=flightgear.git Frederic Bouvier: I made these changes because fltk doesn't recognize path \\SERVER\SHARE as a normal directory, although plib/ul function succeed at enumerating the content of such a path. I had that problem when I decided to test FG on a loaned HP xw4100 workstation. I installed it over the network and the install-source became \\myserver\myshare\. with no scenery files detected. --- diff --git a/utils/fgadmin/src/fgadmin_funcs.cxx b/utils/fgadmin/src/fgadmin_funcs.cxx index ba52467d2..8f6bc9547 100644 --- a/utils/fgadmin/src/fgadmin_funcs.cxx +++ b/utils/fgadmin/src/fgadmin_funcs.cxx @@ -143,10 +143,10 @@ void FGAdminUI::update_install_box() { install_box->clear(); - if ( source.length() && fl_filename_isdir(source.c_str()) ) { + if ( source.length() ) { ulDir *dir = ulOpenDir( source.c_str() ) ; ulDirEnt *ent; - while ( ent = ulReadDir( dir ) ) { + while ( dir != 0 && ( ent = ulReadDir( dir ) ) ) { // find base name of archive file char base[FL_PATH_MAX]; strncpy( base, ent->d_name, FL_PATH_MAX ); @@ -166,7 +166,7 @@ void FGAdminUI::update_install_box() { } if ( strlen(ent->d_name) != 14 ) { - // simple heuristic to ingore non-scenery files + // simple heuristic to ignore non-scenery files } else if ( ent->d_name[0] != 'e' && ent->d_name[0] != 'w' ) { // further sanity checks on name } else if ( ent->d_name[4] != 'n' && ent->d_name[4] != 's' ) { @@ -213,12 +213,12 @@ void FGAdminUI::update_remove_box() { remove_box->clear(); - if ( dest.length() && fl_filename_isdir(dest.c_str()) ) { + if ( dest.length() ) { ulDir *dir = ulOpenDir( dest.c_str() ) ; ulDirEnt *ent; - while ( ent = ulReadDir( dir ) ) { + while ( dir != 0 && ( ent = ulReadDir( dir ) ) ) { if ( strlen(ent->d_name) != 7 ) { - // simple heuristic to ingore non-scenery directories + // simple heuristic to ignore non-scenery directories } else if ( ent->d_name[0] != 'e' && ent->d_name[0] != 'w' ) { // further sanity checks on name } else if ( ent->d_name[4] != 'n' && ent->d_name[4] != 's' ) {