@@ -330,13 +330,15 @@ void HandleCommandLineLaunch()
330
330
// NOTE if keydown, window doesnt become active and focused
331
331
if ( string . IsNullOrEmpty ( version ) || ( Keyboard . Modifiers & ModifierKeys . Shift ) != 0 )
332
332
{
333
- if ( Directory . Exists ( Path . Combine ( proj . Path , "Assets" ) ) == true )
333
+ // if Assets folder exists, then its existing project
334
+ if ( Directory . Exists ( Path . Combine ( proj . Path , "Assets" ) ) == true && ( Directory . GetFiles ( Path . Combine ( proj . Path , "Assets" ) ) . Length > 0 ) )
334
335
{
335
- Tools . DisplayUpgradeDialog ( proj , null , false ) ;
336
+ bool useInitScript = ( bool ) chkUseInitScript . IsChecked ;
337
+
338
+ Tools . DisplayUpgradeDialog ( proj , null , useInitScript ) ;
336
339
}
337
- else // no assets folder here, then its new project
340
+ else // no Assets folder here OR Assets folder is empty , then its new project
338
341
{
339
- //Tools.DisplayUpgradeDialog(proj, null);
340
342
CreateNewEmptyProject ( proj . Path ) ;
341
343
}
342
344
}
@@ -1315,7 +1317,7 @@ private void BtnUpgradeProject_Click(object sender, RoutedEventArgs e)
1315
1317
var proj = GetSelectedProject ( ) ;
1316
1318
if ( proj == null ) return ;
1317
1319
1318
- Tools . DisplayUpgradeDialog ( proj , this , false ) ;
1320
+ Tools . DisplayUpgradeDialog ( proj : proj , owner : this , useInitScript : false ) ;
1319
1321
}
1320
1322
1321
1323
private void GridRecent_Loaded ( object sender , RoutedEventArgs e )
0 commit comments