check for broken link when iterating directory (#55)

pull/40/head
Nestal Wan 2012-06-10 21:12:32 +08:00
parent 89e07bb257
commit 5f61be489b
1 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,10 @@ void State::FromLocal( const fs::path& p, gr::Resource* folder )
if ( IsIgnore(fname) )
Log( "file %1% is ignored by grive", fname, log::verbose ) ;
// check for broken symblic links
else if ( !fs::exists( i->path() ) )
Log( "file %1% doesn't exist (broken link?), ignored", i->path(), log::verbose ) ;
else
{
// if the Resource object of the child already exists, it should