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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user