mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-28 16:57:02 +00:00
Refactor string checks and fix exception when exporting multiple channels
Fix #164
This commit is contained in:
@@ -3,6 +3,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using DiscordChatExporter.Core.Models;
|
||||
using Tyrrrz.Extensions;
|
||||
|
||||
namespace DiscordChatExporter.Core.Services.Helpers
|
||||
{
|
||||
@@ -11,7 +12,7 @@ namespace DiscordChatExporter.Core.Services.Helpers
|
||||
public static bool IsDirectoryPath(string path) =>
|
||||
path.Last() == Path.DirectorySeparatorChar ||
|
||||
path.Last() == Path.AltDirectorySeparatorChar ||
|
||||
Path.GetExtension(path) == null;
|
||||
(Path.GetExtension(path).IsNullOrWhiteSpace() && !File.Exists(path));
|
||||
|
||||
public static string GetDefaultExportFileName(ExportFormat format, Guild guild, Channel channel,
|
||||
DateTimeOffset? after = null, DateTimeOffset? before = null)
|
||||
|
||||
Reference in New Issue
Block a user