focalboard/win-wpf/Focalboard/Utils.cs
2021-03-01 11:36:36 -08:00

22 lines
641 B
C#
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
using System.IO;
namespace Focalboard {
static class Utils {
public static string GetAppFolder() {
string appFolder;
try {
appFolder = Windows.Application­Model.Package.Current.Installed­Location.Path;
} catch {
// Not a UWP app
string appPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
appFolder = Path.GetDirectoryName(appPath);
}
return appFolder;
}
}
}