Skip to content

Commit e1ea3b3

Browse files
refactor: Change how to get the current directory
Based on #11, replaced `Directory.GetCurrentDirectory()` with `AppContext.BaseDirectory`.
1 parent 9f4e9d3 commit e1ea3b3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

WinUI3Localizer.SampleApp/App.xaml.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ private async Task InitializeLocalizer()
116116
{
117117
#if IS_NON_PACKAGED
118118
// Initialize a "Strings" folder in the executables folder.
119-
StringsFolderPath = Path.Combine(Directory.GetCurrentDirectory(), "Strings");
120-
121-
//StorageFolder localFolder = await StorageFolder.GetFolderFromPathAsync(Directory.GetCurrentDirectory());
119+
StringsFolderPath = Path.Combine(AppContext.BaseDirectory, "Strings");
122120
StorageFolder stringsFolder = await StorageFolder.GetFolderFromPathAsync(StringsFolderPath);
123121
#else
124122
// Initialize a "Strings" folder in the "LocalFolder" for the packaged app.

0 commit comments

Comments
 (0)