mirror of
https://github.com/benapetr/stikkit.git
synced 2025-04-25 20:41:20 -05:00
fixes
we need to provide some author name, otherwise we get in problems
This commit is contained in:
parent
07434c5b4d
commit
8cc01ff710
@ -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 = "";
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user