forked from soutade/libgourou
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
d9a920b062 | |||
204500117d | |||
ce2cf4192a | |||
68bf48df27 | |||
81faf1f9be |
14
README.md
14
README.md
|
@ -150,3 +150,17 @@ Special thanks
|
||||||
* _Jens_ for all test samples and utils testing
|
* _Jens_ for all test samples and utils testing
|
||||||
* _Milian_ for debug & code
|
* _Milian_ for debug & code
|
||||||
* _Berwyn H_ for all test samples, feedbacks, patches and kind donation
|
* _Berwyn H_ for all test samples, feedbacks, patches and kind donation
|
||||||
|
|
||||||
|
|
||||||
|
Donation
|
||||||
|
--------
|
||||||
|
|
||||||
|
https://www.paypal.com/donate/?hosted_button_id=JD3U6XMZCPHKN
|
||||||
|
|
||||||
|
|
||||||
|
Donators
|
||||||
|
--------
|
||||||
|
|
||||||
|
* _Berwyn H_
|
||||||
|
* _bwitt_
|
||||||
|
* _Ismail_
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
if [ ! -d lib/updfparser ] ; then
|
if [ ! -d lib/updfparser ] ; then
|
||||||
echo "Some libraries are missing"
|
echo "Some libraries are missing"
|
||||||
echo "You must run this script at the top of libgourou working direcotry."
|
echo "You must run this script at the top of libgourou working direcotry."
|
||||||
echo "./lib/setup.sh must be called first (make all)"
|
echo "./scripts/setup.sh must be called first (make all)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -859,14 +859,21 @@ namespace gourou
|
||||||
std::string DRMProcessor::getDefaultAdeptDir(void)
|
std::string DRMProcessor::getDefaultAdeptDir(void)
|
||||||
{
|
{
|
||||||
#ifndef DEFAULT_ADEPT_DIR
|
#ifndef DEFAULT_ADEPT_DIR
|
||||||
const char* user = getenv("USER");
|
const char* home = getenv("HOME");
|
||||||
|
|
||||||
|
if (home)
|
||||||
|
return home + std::string("/.config/adept/");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const char* user = getenv("USER");
|
||||||
|
|
||||||
if (user && user[0])
|
if (user && user[0])
|
||||||
{
|
{
|
||||||
return std::string("/home/") + user + std::string("/.config/adept/");
|
return std::string("/home/") + user + std::string("/.config/adept/");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return LOCAL_ADEPT_DIR;
|
return LOCAL_ADEPT_DIR;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
return DEFAULT_ADEPT_DIR "/";
|
return DEFAULT_ADEPT_DIR "/";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -229,7 +229,12 @@ private:
|
||||||
maxSizeBookName = loan->bookName.size();
|
maxSizeBookName = loan->bookName.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxSizeBookName > MAX_SIZE_BOOK_NAME)
|
/* Manage empty names */
|
||||||
|
if (maxSizeBookName == 0)
|
||||||
|
maxSizeBookName = sizeof("No name ")-1;
|
||||||
|
else if (maxSizeBookName < 4)
|
||||||
|
maxSizeBookName = 4;
|
||||||
|
else if (maxSizeBookName > MAX_SIZE_BOOK_NAME)
|
||||||
maxSizeBookName = MAX_SIZE_BOOK_NAME;
|
maxSizeBookName = MAX_SIZE_BOOK_NAME;
|
||||||
else if ((maxSizeBookName % 2))
|
else if ((maxSizeBookName % 2))
|
||||||
maxSizeBookName++;
|
maxSizeBookName++;
|
||||||
|
@ -276,7 +281,9 @@ private:
|
||||||
std::cout << kv.first;
|
std::cout << kv.first;
|
||||||
std::cout << " ";
|
std::cout << " ";
|
||||||
|
|
||||||
if (loan->bookName.size() > MAX_SIZE_BOOK_NAME)
|
if (loan->bookName.size() == 0)
|
||||||
|
bookName = std::string("No name ");
|
||||||
|
else if (loan->bookName.size() > MAX_SIZE_BOOK_NAME)
|
||||||
bookName = std::string(loan->bookName.c_str(), MAX_SIZE_BOOK_NAME);
|
bookName = std::string(loan->bookName.c_str(), MAX_SIZE_BOOK_NAME);
|
||||||
else
|
else
|
||||||
bookName = loan->bookName;
|
bookName = loan->bookName;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user