Rev 6822 | Rev 6857 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6822 | Rev 6826 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | int cmd_rm(char file[]) |
1 | int cmd_rm(char file[]) |
2 | { |
2 | { |
Line 3... | Line 3... | ||
3 | 3 | ||
4 | kol_struct70 k70; |
4 | kol_struct70 k70; |
5 | char temp[256]; |
5 | char temp[FILENAME_MAX]; |
Line 6... | Line 6... | ||
6 | unsigned result; |
6 | unsigned result; |
7 | 7 | ||
8 | if (NULL == file || strlen(file) == 0) |
8 | if (NULL == file || strlen(file) == 0) |
Line 26... | Line 26... | ||
26 | } |
26 | } |
27 | else |
27 | else |
28 | { |
28 | { |
29 | strcpy(temp, cur_dir); |
29 | strcpy(temp, cur_dir); |
30 | strcat(temp, file); |
30 | if (temp[strlen(temp)-1] != '/') |
- | 31 | strcat(temp, "/"); // add slash |
|
- | 32 | strcat(temp, file); |
|
31 | 33 | ||
Line 32... | Line 34... | ||
32 | if ( !file_check(temp) ) |
34 | if ( !file_check(temp) ) |
33 | { |
35 | { |
34 | return FALSE; |
36 | return FALSE; |