File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/Xamarin.Android.Build.Tasks/Tasks Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -54,26 +54,28 @@ public override bool RunTask ()
54
54
continue ;
55
55
}
56
56
var files = System . IO . Directory . GetFiles ( absDir , "*" , SearchOption . AllDirectories ) ;
57
- foreach ( string f in files )
57
+ foreach ( string f in files ) {
58
58
if ( ! knownFiles . Contains ( f ) ) {
59
59
Log . LogDebugMessage ( "Deleting File {0}" , f ) ;
60
60
var item = new TaskItem ( f . Replace ( absDir , root + Path . DirectorySeparatorChar ) ) ;
61
61
removedFiles . Add ( item ) ;
62
62
Microsoft . Android . Build . Tasks . Files . SetWriteable ( f ) ;
63
63
File . Delete ( f ) ;
64
64
}
65
+ }
65
66
66
67
if ( RemoveDirectories ) {
67
68
var knownDirs = new HashSet < string > ( knownFiles . Select ( d => Path . GetDirectoryName ( d ) ) ) ;
68
69
var dirs = System . IO . Directory . GetDirectories ( absDir , "*" , SearchOption . AllDirectories ) ;
69
70
70
- foreach ( string d in dirs . OrderByDescending ( s => s . Length ) )
71
+ foreach ( string d in dirs . OrderByDescending ( s => s . Length ) ) {
71
72
if ( ! knownDirs . Contains ( d ) && IsDirectoryEmpty ( d ) ) {
72
73
Log . LogDebugMessage ( "Deleting Directory {0}" , d ) ;
73
74
removedDirectories . Add ( new TaskItem ( d ) ) ;
74
75
Microsoft . Android . Build . Tasks . Files . SetDirectoryWriteable ( d ) ;
75
76
System . IO . Directory . Delete ( d ) ;
76
77
}
78
+ }
77
79
}
78
80
}
79
81
You can’t perform that action at this time.
0 commit comments