mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Create parent folders on startup
This commit is contained in:
parent
c0015f0e8f
commit
d5b66fede7
3 changed files with 14 additions and 1 deletions
|
@ -23,6 +23,7 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
|
@ -38,6 +39,7 @@ public class GradientInfo
|
|||
|
||||
public List<GradientStop> Colors { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public bool IsValid => Colors != null && Colors.Count > 0;
|
||||
|
||||
public GradientInfo()
|
||||
|
|
|
@ -197,7 +197,7 @@ private void nudLocation_ValueChanged(object sender, EventArgs e)
|
|||
{
|
||||
if (isReady)
|
||||
{
|
||||
GradientStop gradientStop = GetSelectedGradientStop(out ListViewItem lvi);
|
||||
GradientStop gradientStop = GetSelectedGradientStop();
|
||||
|
||||
if (gradientStop != null)
|
||||
{
|
||||
|
|
|
@ -232,6 +232,7 @@ public static string ScreenshotsFolder
|
|||
}
|
||||
|
||||
public static string ToolsFolder => Path.Combine(PersonalFolder, "Tools");
|
||||
public static string ImageEffectsFolder => Path.Combine(PersonalFolder, "ImageEffects");
|
||||
public static string ScreenRecorderCacheFilePath => Path.Combine(PersonalFolder, "ScreenRecorder.avi");
|
||||
public static string DefaultFFmpegFilePath => Path.Combine(ToolsFolder, "ffmpeg.exe");
|
||||
public static string ChromeHostManifestFilePath => Path.Combine(ToolsFolder, "Chrome-host-manifest.json");
|
||||
|
@ -270,6 +271,7 @@ private static void Main(string[] args)
|
|||
if (CheckAdminTasks()) return; // If ShareX opened just for be able to execute task as Admin
|
||||
|
||||
UpdatePersonalPath();
|
||||
CreateParentFolders();
|
||||
|
||||
DebugHelper.Init(LogsFilePath);
|
||||
|
||||
|
@ -470,6 +472,15 @@ private static void UpdatePersonalPath()
|
|||
}
|
||||
}
|
||||
|
||||
private static void CreateParentFolders()
|
||||
{
|
||||
Helpers.CreateDirectoryFromDirectoryPath(SettingManager.BackupFolder);
|
||||
Helpers.CreateDirectoryFromDirectoryPath(ImageEffectsFolder);
|
||||
Helpers.CreateDirectoryFromDirectoryPath(LogsFolder);
|
||||
Helpers.CreateDirectoryFromDirectoryPath(ScreenshotsParentFolder);
|
||||
Helpers.CreateDirectoryFromDirectoryPath(ToolsFolder);
|
||||
}
|
||||
|
||||
private static void MigratePersonalPathConfig()
|
||||
{
|
||||
if (File.Exists(PreviousPersonalPathConfigFilePath))
|
||||
|
|
Loading…
Reference in a new issue