Subversion Repositories Kolibri OS

Rev

Rev 7787 | Rev 8827 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7787 Rev 7802
Line 6... Line 6...
6
unsigned	num_of_file; // number of files in directory
6
unsigned	num_of_file; // number of files in directory
7
unsigned	*t;
7
unsigned	*t;
8
unsigned	type_of_file; // check is this a file or a folder
8
unsigned	type_of_file; // check is this a file or a folder
9
int		i, result;
9
int		i, result;
10
 
10
char tmp[FILENAME_MAX];
-
 
11
 
Line 11... Line 12...
11
bool single_column_mode = FALSE;
12
bool single_column_mode = FALSE;
Line 12... Line 13...
12
 
13
 
Line 24... Line 25...
24
	single_column_mode = TRUE;
25
	single_column_mode = TRUE;
25
	dir += 3;
26
	dir += 3;
26
	}
27
	}
27
 
28
 
Line 28... Line 29...
28
if ( !strlen(dir) )
29
if ( !strlen(dir) ) // if argument is empty, list current directory
29
	k70.p21 = cur_dir;
30
	k70.p21 = cur_dir;
30
else
31
else
-
 
32
{
-
 
33
	if (dir[0] != '/') // if given directory is relative path, then append cur_dir on left side
-
 
34
	{
-
 
35
		strcpy(tmp, cur_dir);
-
 
36
	    if (tmp[strlen(tmp)-1] != '/')
-
 
37
	    {
-
 
38
	        strcat(tmp, "/"); // add slash
-
 
39
	    }
-
 
40
	    strcat(tmp, dir);
-
 
41
	    k70.p21 = tmp;
-
 
42
	} else // if given directory is an absolute path
-
 
43
	{
31
	k70.p21 = dir;
44
		k70.p21 = dir;
-
 
45
	}
-
 
46
}
Line 32... Line 47...
32
 
47
 
33
result = kol_file_70(&k70);
48
result = kol_file_70(&k70);
34
if ( !((result==0) || (result==6)) ) // check does the directory exists
49
if ( !((result==0) || (result==6)) ) // check does the directory exists
35
	{
50
	{