mirror of
https://github.com/benapetr/stikkit.git
synced 2025-04-25 20:41:20 -05:00
Merge branch 'master' into ubuntu
This commit is contained in:
commit
adc19767b8
@ -24,7 +24,7 @@ string Configuration::URL = "";
|
||||
string Configuration::Expiry = "60";
|
||||
bool Configuration::Private = false;
|
||||
string Configuration::Author = "";
|
||||
string Configuration::Version = "1.0.2";
|
||||
string Configuration::Version = "1.0.3";
|
||||
string Configuration::Title = "";
|
||||
string Configuration::Home = "";
|
||||
string Configuration::DefaultURL = "";
|
||||
@ -60,6 +60,11 @@ void Configuration::Init()
|
||||
}
|
||||
f.close();
|
||||
}
|
||||
if (Configuration::Author.length() < 1)
|
||||
{
|
||||
// we don't have any author here! let's get it from passwd
|
||||
Configuration::Author = pw->pw_name;
|
||||
}
|
||||
}
|
||||
|
||||
void Configuration::Store()
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
#include <curl/curl.h>
|
||||
#include "configuration.hpp"
|
||||
#include "terminalparser.hpp"
|
||||
@ -37,15 +36,8 @@ int main(int argc, char *argv[])
|
||||
delete t;
|
||||
if (!Stikkit::Configuration::Author.length())
|
||||
{
|
||||
char buffer[200];
|
||||
if (getlogin_r(buffer, 200))
|
||||
{
|
||||
Stikkit::Configuration::Author = buffer;
|
||||
} else
|
||||
{
|
||||
// we need to provide some author name otherwise stikked will not display anything or some random characters there
|
||||
Stikkit::Configuration::Author = "Unknown";
|
||||
}
|
||||
// we need to provide some author name otherwise stikked will not display anything or some random characters there
|
||||
Stikkit::Configuration::Author = "Unknown";
|
||||
}
|
||||
if (!Stikkit::Configuration::URL.length())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user