mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 21:28:40 +00:00
Shell: Validate only one directory is given to cd
This commit is contained in:
committed by
Andreas Kling
parent
d0fb816ac3
commit
0de2ead0e9
@@ -187,6 +187,11 @@ static String expand_tilde(const char* expression)
|
||||
|
||||
static int sh_cd(int argc, const char** argv)
|
||||
{
|
||||
if (argc > 2) {
|
||||
fprintf(stderr, "cd: too many arguments\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
String new_path;
|
||||
|
||||
if (argc == 1) {
|
||||
|
||||
Reference in New Issue
Block a user