fixed bug #1701290 - linux FTBFS: stubs and librarylocal
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5088 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
4f35575dd6
commit
24f43a6214
2 changed files with 15 additions and 7 deletions
|
@ -6,12 +6,15 @@
|
|||
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "../../../Source/Platform.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <direct.h>
|
||||
|
||||
#include "../../../Source/ResourceEditor.h"
|
||||
#include "../../../Source/ResourceVersionInfo.h"
|
||||
#include "../../../Source/winchar.h"
|
||||
|
||||
using namespace std;
|
||||
|
@ -141,8 +144,8 @@ int main(int argc, char* argv[])
|
|||
mode = argv[1];
|
||||
filename = argv[2];
|
||||
|
||||
char buf[MAX_PATH];
|
||||
GetCurrentDirectory(MAX_PATH, buf);
|
||||
char buf[1024];
|
||||
getcwd(buf, 1024);
|
||||
filepath = buf;
|
||||
|
||||
if ((filename.substr(0, 1).compare("\\") != 0) && (filename.substr(1, 1).compare(":") != 0)) {
|
||||
|
@ -184,14 +187,15 @@ int main(int argc, char* argv[])
|
|||
|
||||
// Validate filename
|
||||
|
||||
WIN32_FIND_DATA wfd;
|
||||
HANDLE hFind = FindFirstFile(filepath.c_str(), &wfd);
|
||||
ifstream fs(filepath.c_str());
|
||||
|
||||
if (hFind != INVALID_HANDLE_VALUE)
|
||||
if (fs.is_open())
|
||||
{
|
||||
filefound = 1;
|
||||
FindClose(hFind);
|
||||
fs.close();
|
||||
}
|
||||
|
||||
// Work
|
||||
|
||||
int versionfound = 0;
|
||||
DWORD low = 0, high = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue