Core: LoadFile checks whether path is a file (because POSIX opens a dir too), Core/Rpc: StopRpcServerTrace

git-svn-id: svn://ultimatepp.org/upp/trunk@5546 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-11-13 07:53:32 +00:00
parent bd87a04fda
commit 43e1289eed
4 changed files with 641 additions and 632 deletions

View file

@ -1496,8 +1496,12 @@ String LoadStream(Stream& in) {
}
String LoadFile(const char *filename) {
FileIn in(filename);
return LoadStream(in);
FindFile ff(filename);
if(ff && ff.IsFile()) {
FileIn in(filename);
return LoadStream(in);
}
return String::GetVoid();
}
bool SaveStream(Stream& out, const String& data) {