refactor(1): detection App->Core + AppPaths (VD_DATA_DIR isolation for deterministic E2E)
This commit is contained in:
parent
1aab8729fa
commit
9eb988440f
5 changed files with 29 additions and 7 deletions
14
VideoDownloader.App/AppPaths.cs
Normal file
14
VideoDownloader.App/AppPaths.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
namespace VideoDownloader.App;
|
||||
|
||||
/// <summary>
|
||||
/// 앱 데이터 디렉터리 결정. 기본 %AppData%/VideoDownloader.
|
||||
/// 환경변수 VD_DATA_DIR 로 오버라이드 — E2E 테스트가 실사용자 프로필/설정/세션과
|
||||
/// 격리된 임시 디렉터리에서 실행되도록 한다(결정적 테스트를 위한 공식 후크).
|
||||
/// </summary>
|
||||
public static class AppPaths
|
||||
{
|
||||
public static string DataDir =>
|
||||
Environment.GetEnvironmentVariable("VD_DATA_DIR") is { Length: > 0 } env
|
||||
? env
|
||||
: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "VideoDownloader");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue