fix storage selection
This commit is contained in:
		| @@ -310,7 +310,6 @@ public class SettingsUi : WindowMediatorSubscriberBase | |||||||
| #if DEBUG | #if DEBUG | ||||||
|         if (LastCreatedCharacterData != null && ImGui.TreeNode("Last created character data")) |         if (LastCreatedCharacterData != null && ImGui.TreeNode("Last created character data")) | ||||||
|         { |         { | ||||||
|              |  | ||||||
|             foreach (var l in JsonSerializer.Serialize(LastCreatedCharacterData, new JsonSerializerOptions() { WriteIndented = true }).Split('\n')) |             foreach (var l in JsonSerializer.Serialize(LastCreatedCharacterData, new JsonSerializerOptions() { WriteIndented = true }).Split('\n')) | ||||||
|             { |             { | ||||||
|                 ImGui.Text($"{l}"); |                 ImGui.Text($"{l}"); | ||||||
| @@ -391,7 +390,7 @@ public class SettingsUi : WindowMediatorSubscriberBase | |||||||
|                         _configService.Current.ExportFolder = Path.GetDirectoryName(path) ?? string.Empty; |                         _configService.Current.ExportFolder = Path.GetDirectoryName(path) ?? string.Empty; | ||||||
|                         _configService.Save(); |                         _configService.Save(); | ||||||
|  |  | ||||||
|                         Task.Run(() => |                         _ = Task.Run(() => | ||||||
|                         { |                         { | ||||||
|                             try |                             try | ||||||
|                             { |                             { | ||||||
| @@ -446,7 +445,7 @@ public class SettingsUi : WindowMediatorSubscriberBase | |||||||
|             ImGui.BeginDisabled(); |             ImGui.BeginDisabled(); | ||||||
|         if (UiSharedService.IconTextButton(FontAwesomeIcon.Trash, "Clear local storage") && UiSharedService.CtrlPressed() && _readClearCache) |         if (UiSharedService.IconTextButton(FontAwesomeIcon.Trash, "Clear local storage") && UiSharedService.CtrlPressed() && _readClearCache) | ||||||
|         { |         { | ||||||
|             Task.Run(() => |             _ = Task.Run(() => | ||||||
|             { |             { | ||||||
|                 foreach (var file in Directory.GetFiles(_configService.Current.CacheFolder)) |                 foreach (var file in Directory.GetFiles(_configService.Current.CacheFolder)) | ||||||
|                 { |                 { | ||||||
|   | |||||||
| @@ -474,7 +474,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase | |||||||
|  |  | ||||||
|                 _isPenumbraDirectory = string.Equals(path.ToLowerInvariant(), _ipcManager.PenumbraModDirectory?.ToLowerInvariant(), StringComparison.Ordinal); |                 _isPenumbraDirectory = string.Equals(path.ToLowerInvariant(), _ipcManager.PenumbraModDirectory?.ToLowerInvariant(), StringComparison.Ordinal); | ||||||
|                 _isDirectoryWritable = IsDirectoryWritable(path); |                 _isDirectoryWritable = IsDirectoryWritable(path); | ||||||
|                 _cacheDirectoryHasOtherFilesThanCache = Directory.GetFiles(path, "*", SearchOption.AllDirectories).Any(f => new FileInfo(f).Name.Length != 40); |                 _cacheDirectoryHasOtherFilesThanCache = Directory.GetFiles(path, "*", SearchOption.AllDirectories).Any(f => Path.GetFileNameWithoutExtension(f).Length != 40); | ||||||
|                 _cacheDirectoryIsValidPath = PathRegex().IsMatch(path); |                 _cacheDirectoryIsValidPath = PathRegex().IsMatch(path); | ||||||
|  |  | ||||||
|                 if (!string.IsNullOrEmpty(path) |                 if (!string.IsNullOrEmpty(path) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 rootdarkarchon
					rootdarkarchon