From 3dec1bfb202f2614465dd7028c175e8e3e5ef44b Mon Sep 17 00:00:00 2001 From: janwas Date: Mon, 10 Apr 2006 16:59:21 +0000 Subject: [PATCH] # bugfix for #78: definition of PATH_MAX was too small/mixed up with VFS_MAX_PATH This was SVN commit r3741. --- source/lib/res/file/vfs.cpp | 2 +- source/lib/res/file/vfs_optimizer.cpp | 2 +- source/lib/sysdep/win/wposix.h | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/lib/res/file/vfs.cpp b/source/lib/res/file/vfs.cpp index ae9978ea5c..b032521720 100755 --- a/source/lib/res/file/vfs.cpp +++ b/source/lib/res/file/vfs.cpp @@ -122,7 +122,7 @@ static LibError VDir_reload(VDir* vd, const char* path, Handle UNUSED(hvd)) { // add required trailing slash if not already present to make // caller's life easier. - char V_path_slash[PATH_MAX]; + char V_path_slash[VFS_MAX_PATH]; RETURN_ERR(vfs_path_append(V_path_slash, path, "")); RETURN_ERR(tree_dir_open(V_path_slash, &vd->it)); diff --git a/source/lib/res/file/vfs_optimizer.cpp b/source/lib/res/file/vfs_optimizer.cpp index 05de09d2c3..942df243ba 100644 --- a/source/lib/res/file/vfs_optimizer.cpp +++ b/source/lib/res/file/vfs_optimizer.cpp @@ -611,7 +611,7 @@ static LibError vfs_opt_init(const char* trace_filename, const char* archive_fn_ // note: this is needed by should_rebuild_main_archive and later in // vfs_opt_continue; must be done here instead of inside the former // because that is not called when force_build == true. - char dir[PATH_MAX]; + char dir[VFS_MAX_PATH]; path_dir_only(archive_fn_fmt, dir); DirEnts existing_archives; // and possibly other entries RETURN_ERR(file_get_sorted_dirents(dir, existing_archives)); diff --git a/source/lib/sysdep/win/wposix.h b/source/lib/sysdep/win/wposix.h index 4ef4dedc51..aeff063c3a 100755 --- a/source/lib/sysdep/win/wposix.h +++ b/source/lib/sysdep/win/wposix.h @@ -55,8 +55,7 @@ extern "C" { // // -#define PATH_MAX 255 -// Win32 MAX_PATH is 260 +#define PATH_MAX 260 // matches Win32 MAX_PATH #if OS_WIN # ifndef SIZE_MAX // VC2005 already defines this in limits.h