Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f8c2aee

Browse files
Added comment for Absoulute Path
1 parent 86c361c commit f8c2aee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎shell.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void (*run_command[])(char[][MaxSize],int) =
5454
FILE *historyFile;
5555
char fileName[MaxSize];
5656

57-
char AbsolutePath[MaxSize]="/home/deadlocks/Codes/assignment1/1.2";
57+
char AbsolutePath[MaxSize]; //Abosulute path of directory where files are present. No need to manually assign path. Just in case if program is unable to get path itself
5858

5959
int main()
6060
{
@@ -260,7 +260,7 @@ void run_cd(char tokens[][MaxSize],int size)
260260
printf("Unable to open path\n");
261261
if(chdir("home")==-1)
262262
printf("Unable to open path\n");
263-
char *user="deadlocks";
263+
char *user;
264264
user=getlogin();
265265
if(user==NULL)
266266
printf("Unable to open path\n");

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /