Fixed download block if security was not right
This commit is contained in:
parent
196b44ac7f
commit
0ab82503b7
@ -469,20 +469,20 @@ int ShowOneFile()
|
||||
|
||||
int CheckBytesAvailable(long CostSize)
|
||||
{
|
||||
if (LIMIT.DownK || LIMIT.DownF) {
|
||||
if (LIMIT.DownK) {
|
||||
if ((exitinfo.DownloadKToday <= 0) || ((CostSize / 1024) > exitinfo.DownloadKToday)) {
|
||||
|
||||
/* You do not have enough bytes to download \" */
|
||||
pout(12, 0, (char *) Language(252));
|
||||
pout(LIGHTRED, BLACK, (char *) Language(252));
|
||||
Enter(1);
|
||||
Syslog('+', "Not enough bytes to download %ld", CostSize);
|
||||
|
||||
colour(15, 0);
|
||||
colour(WHITE, BLACK);
|
||||
/* You must upload before you can download. */
|
||||
pout(12, 0, (char *) Language(253));
|
||||
pout(LIGHTRED, BLACK, (char *) Language(253));
|
||||
Enter(2);
|
||||
|
||||
colour(14, 0);
|
||||
colour(YELLOW, BLACK);
|
||||
/* Kilobytes currently available: */
|
||||
printf("%s%lu Kbytes.\n\n", (char *) Language(254), exitinfo.DownloadKToday);
|
||||
|
||||
@ -887,7 +887,7 @@ int Addfile(char *File, int AreaNum, int fileid)
|
||||
file.UploadDate = time(NULL);
|
||||
if (strcmp(file.Name, file.LName)) {
|
||||
sprintf(lname, "%s/%s", area.Path, file.Name);
|
||||
if (link(Filename, lname)) {
|
||||
if (symlink(Filename, lname)) {
|
||||
WriteError("$Can't create link %s to %s", lname, Filename);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user