aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/store.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/conf/store.go b/conf/store.go
index b5cdd1ef..504a0d01 100644
--- a/conf/store.go
+++ b/conf/store.go
@@ -148,6 +148,10 @@ func LoadFromPath(path string) (*Config, error) {
return FromWgQuickWithUnknownEncoding(string(bytes), name)
}
+func PathIsEncrypted(path string) bool {
+ return strings.HasSuffix(filepath.Base(path), configFileSuffix)
+}
+
func NameFromPath(path string) (string, error) {
name := filepath.Base(path)
if !((len(name) > len(configFileSuffix) && strings.HasSuffix(name, configFileSuffix)) ||