From 75cbfc05f28c6eb31ed7244a458d297a8695bcac Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Thu, 29 Dec 2005 14:34:20 +0000 Subject: [PATCH] replaced access() with Glib::file_test in wait_for_node() * src/GParted_Core.cc: replaced access() with Glib::file_test in wait_for_node() --- ChangeLog | 4 ++++ src/GParted_Core.cc | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba3b68d1..08010975 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-12-29 Bart Hakvoort + + * src/GParted_Core.cc: replaced access() with Glib::file_test in wait_for_node() + 2005-12-29 Bart Hakvoort * src/Win_GParted.cc: disable treeview and graphical partition display at scantime diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index eb9e98b2..7d5888cc 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -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