Skip to content

Commit

Permalink
if there are only empty groups and UseSolutionDir is active then a js…
Browse files Browse the repository at this point in the history
…on is now still saved
  • Loading branch information
Irame committed Mar 4, 2023
1 parent 72b2477 commit b68e732
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SmartCmdArgs/SmartCmdArgs.Shared/Logic/FileStorage.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.VisualStudio.Shell.Interop;
using SmartCmdArgs.Helper;
using SmartCmdArgs.ViewModel;
using System;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down Expand Up @@ -242,7 +243,8 @@ private void SaveJsonForSolution()

using (solutionFsWatcher?.TemporarilyDisable())
{
if (cmdPackage.ToolWindowViewModel.TreeViewModel.AllArguments.Any() || !cmdPackage.DeleteEmptyFilesAutomatically)
var allItemsExceptProjects = cmdPackage.ToolWindowViewModel.TreeViewModel.AllItems.Where(i => !(i is CmdProject));
if (allItemsExceptProjects.Any() || !cmdPackage.DeleteEmptyFilesAutomatically)
{
if (!vsHelper.CanEditFile(jsonFilename))
{
Expand Down

0 comments on commit b68e732

Please sign in to comment.