設定の範囲と容量の単位を定数から導く
このコミットが含まれているのは:
5ファイル変更
+37
-11
検索条件に一致するファイルはありません
@@ -10,6 +10,10 @@ internal sealed class UndoTreeRecordStore(string directory)
|
||||
{
|
||||
const string Extension = ".json";
|
||||
const string TemporaryExtension = ".tmp";
|
||||
const int NameLength = 32;
|
||||
|
||||
public const long BytesPerKilobyte = 1024;
|
||||
public const long BytesPerMegabyte = BytesPerKilobyte * BytesPerKilobyte;
|
||||
|
||||
static readonly Lazy<UndoTreeRecordStore> DefaultStore = new(() => new UndoTreeRecordStore(Path.Combine(AppDirectories.UserResourceDirectory, "cache", "UndoTree")));
|
||||
static readonly JsonSerializerOptions Options = new() { WriteIndented = false };
|
||||
@@ -24,7 +28,7 @@ internal sealed class UndoTreeRecordStore(string directory)
|
||||
{
|
||||
var normalized = Path.GetFullPath(projectPath).ToUpperInvariant();
|
||||
var hash = Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(normalized)));
|
||||
return Path.Combine(Directory, hash[..32] + Extension);
|
||||
return Path.Combine(Directory, hash[..NameLength] + Extension);
|
||||
}
|
||||
|
||||
public bool Exists(string projectPath)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする