Mercurial > mplayer.hg
comparison gui/dialog/fileselect.c @ 35832:6e4f1f9faca0
Fix bug with deleted file appearing in the path list.
Since r35493 a file just played, stopped and deleted while the GUI is in
idle mode appeared in the file selector path list upon the next evLoad.
author | ib |
---|---|
date | Thu, 28 Feb 2013 11:18:20 +0000 |
parents | 6d576acb772b |
children | dbfedb331095 |
comparison
equal
deleted
inserted
replaced
35831:acc4ff4f279c | 35832:6e4f1f9faca0 |
---|---|
329 dir = strdup( tmp ); | 329 dir = strdup( tmp ); |
330 | 330 |
331 do | 331 do |
332 { | 332 { |
333 char * c = strrchr( dir,'/' ); | 333 char * c = strrchr( dir,'/' ); |
334 if ( ( stat( dir,&f ) != 0 ) || S_ISDIR( f.st_mode ) ) break; | 334 if ( ( stat( dir,&f ) == 0 ) && S_ISDIR( f.st_mode ) ) break; |
335 if ( c ) *c=0; | 335 if ( c ) *c=0; |
336 } while ( strrchr( dir,'/' ) ); | 336 } while ( strrchr( dir,'/' ) ); |
337 | 337 |
338 if ( !dir[0] ) nfree( dir ); | 338 if ( !dir[0] ) nfree( dir ); |
339 } | 339 } |