From 950094775c2b5317d9b984f228e948fd57eb5d0d Mon Sep 17 00:00:00 2001 From: Framawiki Date: Fri, 5 May 2017 19:13:45 +0200 Subject: [PATCH] Add support of "~/.stikkit/private" --- README.md | 1 + stikkit/configuration.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index be6a53d..63e5b72 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ Within this directory, there are a few key files worth creating. - *apikey* - If your stikked installation requires an API key, save it in here - *expiry* - The default expiry time (in minutes) for a paste, if needed - *author* - The default author name if you wish to use one + - *private* - If you want to mark the paste as private (not visible in recent pastes), create this empty file Tips ===== diff --git a/stikkit/configuration.cpp b/stikkit/configuration.cpp index 5e1665f..95983a1 100644 --- a/stikkit/configuration.cpp +++ b/stikkit/configuration.cpp @@ -114,6 +114,13 @@ void Configuration::Init() Configuration::Author = lineauth; } fauth.close(); + + //private + std::ifstream fpriv(homedir + "/.stikkit/private"); + if(fpriv.good()) + { + Configuration::Private = true; + } } if (Configuration::Author.length() < 1) {