Remove getFileContain function's limitation.
This commit is contained in:
parent
ec340000cc
commit
e919d4d05a
|
@ -74,13 +74,7 @@ std::string getFileContent(const TCHAR *file2read)
|
||||||
{
|
{
|
||||||
lenFile = fread(data, 1, blockSize - 1, fp);
|
lenFile = fread(data, 1, blockSize - 1, fp);
|
||||||
if (lenFile <= 0) break;
|
if (lenFile <= 0) break;
|
||||||
|
wholeFileContent.append(data, lenFile);
|
||||||
if (lenFile >= blockSize - 1)
|
|
||||||
data[blockSize - 1] = '\0';
|
|
||||||
else
|
|
||||||
data[lenFile] = '\0';
|
|
||||||
|
|
||||||
wholeFileContent += data;
|
|
||||||
}
|
}
|
||||||
while (lenFile > 0);
|
while (lenFile > 0);
|
||||||
|
|
||||||
|
@ -88,7 +82,6 @@ std::string getFileContent(const TCHAR *file2read)
|
||||||
return wholeFileContent;
|
return wholeFileContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char getDriveLetter()
|
char getDriveLetter()
|
||||||
{
|
{
|
||||||
char drive = '\0';
|
char drive = '\0';
|
||||||
|
|
Loading…
Reference in New Issue