we need to provide some author name, otherwise we get in problems
This commit is contained in:
Petr Bena 2014-05-25 17:16:33 +02:00
parent 07434c5b4d
commit 8cc01ff710
2 changed files with 6 additions and 2 deletions

View File

@ -24,7 +24,7 @@ string Configuration::URL = "";
string Configuration::Expiry = "60";
bool Configuration::Private = false;
string Configuration::Author = "";
string Configuration::Version = "1.0.1";
string Configuration::Version = "1.0.2";
string Configuration::Title = "";
string Configuration::Home = "";
string Configuration::DefaultURL = "";

View File

@ -41,6 +41,10 @@ int main(int argc, char *argv[])
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";
}
}
if (!Stikkit::Configuration::URL.length())
@ -75,7 +79,7 @@ int main(int argc, char *argv[])
Stikkit::Configuration::URL += "/api/create";
std::string line;
while (getline(std::cin, line))
Stikkit::Configuration::Source += line;
Stikkit::Configuration::Source += line + "\n";
if (Stikkit::Configuration::Source.size() < 1)
{
Stikkit::Syslog::Log("Refusing to upload empty string");