mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtfile: define MAX_PATH to PATH_MAX rather than 1024, also CID 87557
This commit is contained in:
parent
494fd64314
commit
caa95ba67c
5 changed files with 13 additions and 9 deletions
|
@ -106,7 +106,7 @@
|
|||
#include "SharedMsgs.h"
|
||||
|
||||
|
||||
#define MAX_PATH 1024
|
||||
#define MAX_PATH PATH_MAX
|
||||
|
||||
static char * CHANGEDIRECTORY = "ChangeDirectory";
|
||||
|
||||
|
|
|
@ -2858,10 +2858,13 @@ _ReadDir(
|
|||
if (fp->is_subdir)
|
||||
{
|
||||
/* construct sub directory name */
|
||||
strcpy(subdir_name, directory_name);
|
||||
if (subdir_name[strlen(subdir_name) - 1] != '/')
|
||||
strcat(subdir_name, "/");
|
||||
strcat(subdir_name, fp->file_name);
|
||||
strncpy(subdir_name, directory_name, MAX_PATH - 1);
|
||||
if (strlen(subdir_name) > 0
|
||||
&& subdir_name[strlen(subdir_name) - 1] != '/')
|
||||
strncat(subdir_name, "/", MAX_PATH - 1);
|
||||
|
||||
strncat(subdir_name, fp->file_name, MAX_PATH - 1);
|
||||
subdir_name[MAX_PATH - 1] = 0;
|
||||
|
||||
/* see if we know this entry from branch_list */
|
||||
if (!QueryBranchList(file_mgr_data, branch_list, subdir_name, &ts))
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
/* Generally used defines */
|
||||
|
||||
#define MAX_PATH 1024
|
||||
#define MAX_PATH PATH_MAX
|
||||
#define BLOCK_SIZE 1024
|
||||
#define BUF_SIZE 256
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
************************************<+>*************************************/
|
||||
|
||||
/* Macros */
|
||||
#define MAX_PATH 1024
|
||||
#define MAX_PATH PATH_MAX
|
||||
|
||||
#define G_OVERWRITE_EXISTING 0
|
||||
#define G_SKIP 1
|
||||
|
|
|
@ -49,7 +49,8 @@
|
|||
|
||||
#define TIGHTNESS 20 /* button spacing in Create_Action_Area */
|
||||
|
||||
#define MAX_PATH 1024 /* Maximum path length */
|
||||
#include <limits.h>
|
||||
#define MAX_PATH PATH_MAX /* Maximum path length */
|
||||
|
||||
/* Types */
|
||||
|
||||
|
|
Loading…
Reference in a new issue