replaced access() with Glib::file_test in wait_for_node()

* src/GParted_Core.cc: replaced access() with Glib::file_test in wait_for_node()
This commit is contained in:
Bart Hakvoort 2005-12-29 14:34:20 +00:00
parent 15604e46c0
commit 75cbfc05f2
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2005-12-29 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/GParted_Core.cc: replaced access() with Glib::file_test in wait_for_node()
2005-12-29 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/Win_GParted.cc: disable treeview and graphical partition display at scantime

View File

@ -923,9 +923,9 @@ bool GParted_Core::wait_for_node( const Glib::ustring & node )
//we'll loop for 10 seconds or till 'node' appeares...
for( short t = 0 ; t < 50 ; t++ )
{
if ( access( node .c_str(), F_OK ) == 0 )
if ( Glib::file_test( node, Glib::FILE_TEST_EXISTS ) )
{
sleep( 1 ) ; //apperantly the node isn't available immediatly after access returns succesfully :/
sleep( 1 ) ; //apperantly the node isn't available immediatly after file_test returns succesfully :/
return true ;
}
else