get rid of extra spaces in is_valid_instpath so "C:\ " will not be valid

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4203 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2005-07-30 12:33:20 +00:00
parent dd29796e0f
commit d41f11b8d1
2 changed files with 4 additions and 3 deletions

View file

@ -289,6 +289,8 @@ int NSISCALL is_valid_instpath(char *s)
mystrcpy(tmp, s);
validate_filename(tmp);
root = skip_root(tmp);
if (!root)
@ -681,7 +683,7 @@ char * NSISCALL GetNSISString(char *outbuf, int strtab)
return ps_tmpbuf;
}
char * NSISCALL validate_filename(char *in) {
void NSISCALL validate_filename(char *in) {
char *nono = "*?|<>/\":";
char *out;
char *out_save;
@ -715,7 +717,6 @@ char * NSISCALL validate_filename(char *in) {
else
break;
} while (out_save < out);
return out_save;
}
#ifdef NSIS_CONFIG_LOG

View file

@ -65,7 +65,7 @@ char * NSISCALL findchar(char *str, char c);
void NSISCALL trimslashtoend(char *buf);
char * NSISCALL skip_root(char *path);
int NSISCALL is_valid_instpath(char *s);
char * NSISCALL validate_filename(char *fn);
void NSISCALL validate_filename(char *fn);
void NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew);
void NSISCALL mini_memcpy(void *out, const void *in, int len);