1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 12:52:28 +01:00

don't allow attempts to :source directories

This commit is contained in:
Doug Kearns
2008-09-10 10:29:00 +00:00
parent 2449b20e44
commit de6b32af54

View File

@@ -679,11 +679,17 @@ lookup:
{
var file = ioManager.getFile(filename);
if (!file.exists())
if (!file.exists() || !file.isReadable() || file.isDirectory())
{
if (!silent)
{
if (file.isDirectory())
liberator.echo("Cannot source a directory: \"" + filename + "\"\n");
liberator.echoerr("E484: Can't open file " + filename);
return false;
}
return;
}
var str = ioManager.readFile(filename);