This commit is contained in:
@@ -348,17 +348,9 @@ namespace AyaNova.Util
|
||||
|
||||
internal static long BackupFilesDriveAvailableSpace()
|
||||
{
|
||||
try
|
||||
{
|
||||
return new System.IO.DriveInfo(Path.GetPathRoot(BackupFilesFolder)).AvailableFreeSpace;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("FileUtil::UtilityFilesDriveAvailableSpace");
|
||||
log.LogError(ex, "FileUtil::UtilityFilesDriveAvailableSpace error getting available space");
|
||||
return 0;
|
||||
}
|
||||
return new System.IO.DriveInfo(Path.GetPathRoot(BackupFilesFolder)).AvailableFreeSpace;
|
||||
|
||||
}
|
||||
|
||||
#endregion Utility file handling
|
||||
@@ -594,17 +586,7 @@ namespace AyaNova.Util
|
||||
|
||||
internal static long AttachmentFilesDriveAvailableSpace()
|
||||
{
|
||||
try
|
||||
{
|
||||
return new System.IO.DriveInfo(Path.GetPathRoot(AttachmentFilesFolder)).AvailableFreeSpace;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("FileUtil::AttachmentFilesDriveAvailableSpace");
|
||||
log.LogError(ex, "FileUtil::AttachmentFilesDriveAvailableSpace error getting available space");
|
||||
return 0;
|
||||
}
|
||||
return new System.IO.DriveInfo(Path.GetPathRoot(AttachmentFilesFolder)).AvailableFreeSpace;
|
||||
}
|
||||
|
||||
internal static IEnumerable<string> GetAllAttachmentFilePaths()
|
||||
@@ -822,8 +804,10 @@ namespace AyaNova.Util
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static string StringPathDecodeEnvironmentVariables(string path){
|
||||
if(string.IsNullOrWhiteSpace(path)){
|
||||
public static string StringPathDecodeEnvironmentVariables(string path)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(path))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user