@@ -159,21 +159,24 @@ public static async Task CloneRoot(XivDependencyRoot Source, XivDependencyRoot D
159
159
ProgressReporter . Report ( "Removing existing modifications to destination root..." ) ;
160
160
}
161
161
162
- var dPath = Destination . Info . GetRootFolder ( ) ;
163
- foreach ( var mod in modlist . Mods )
162
+ if ( Destination != Source )
164
163
{
165
- if ( mod . fullPath . StartsWith ( dPath ) && ! mod . IsInternal ( ) )
164
+ var dPath = Destination . Info . GetRootFolder ( ) ;
165
+ foreach ( var mod in modlist . Mods )
166
166
{
167
- if ( Destination . Info . SecondaryType != null || Destination . Info . Slot == null )
168
- {
169
- // If this is a slotless root, purge everything.
170
- await _modding . DeleteMod ( mod . fullPath , false ) ;
171
- }
172
- else if ( allFiles . Contains ( mod . fullPath ) || mod . fullPath . Contains ( Destination . Info . Slot ) )
167
+ if ( mod . fullPath . StartsWith ( dPath ) && ! mod . IsInternal ( ) )
173
168
{
174
- // Otherwise, only purge the files we're replacing, and anything else that
175
- // contains our slot name.
176
- await _modding . DeleteMod ( mod . fullPath , false ) ;
169
+ if ( Destination . Info . SecondaryType != null || Destination . Info . Slot == null )
170
+ {
171
+ // If this is a slotless root, purge everything.
172
+ await _modding . DeleteMod ( mod . fullPath , false ) ;
173
+ }
174
+ else if ( allFiles . Contains ( mod . fullPath ) || mod . fullPath . Contains ( Destination . Info . Slot ) )
175
+ {
176
+ // Otherwise, only purge the files we're replacing, and anything else that
177
+ // contains our slot name.
178
+ await _modding . DeleteMod ( mod . fullPath , false ) ;
179
+ }
177
180
}
178
181
}
179
182
}
0 commit comments