@@ -95,8 +95,10 @@ class CEnterCriticalSection
9595
9696// because Windows GetTempFileName doesn't work, we wrote our own clone:
9797// creates file/directory (based on 'file') at path 'path' (NULL -> Windows TEMP dir),
98- // with prefix 'prefix', returns name of created file in 'tmpName' (min. size MAX_PATH ),
98+ // with prefix 'prefix', returns name of created file in 'tmpName' (size in 'tmpNameLen' ),
9999// returns "success?" (on failure returns Windows error code via SetLastError - for compatibility)
100+ BOOL SalGetTempFileName (const char * path, const char * prefix, char * tmpName, int tmpNameLen, BOOL file);
101+ // legacy compatibility overload ('tmpName' must be at least MAX_PATH)
100102BOOL SalGetTempFileName (const char * path, const char * prefix, char * tmpName, BOOL file);
101103
102104// because Windows MoveFile can't rename files with read-only attribute on Novell,
@@ -153,6 +155,8 @@ BOOL IsNOVELLDrive(const char* path);
153155// whether file size check is needed after copying); for optimization
154156// purposes uses 'lastLantasticCheckRoot' (for first call "", then don't change)
155157// and 'lastIsLantasticPath' (result for 'lastLantasticCheckRoot')
158+ BOOL IsLantasticDrive (const char * path, char * lastLantasticCheckRoot, int lastLantasticCheckRootBufSize, BOOL & lastIsLantasticPath);
159+ // legacy compatibility overload ('lastLantasticCheckRoot' must be at least MAX_PATH)
156160BOOL IsLantasticDrive (const char * path, char * lastLantasticCheckRoot, BOOL & lastIsLantasticPath);
157161
158162// returns TRUE for network paths
@@ -259,8 +263,12 @@ BOOL PathsAreOnTheSameVolume(const char* path1, const char* path2, BOOL* resIsOn
259263BOOL IsTheSamePath (const char * path1, const char * path2);
260264
261265// determines if path is plugin FS type, 'path' is the path being checked, 'fsName' is
262- // buffer of MAX_PATH characters for FS name (or NULL), returns 'userPart' (if != NULL) - pointer
263- // into 'path' to first character of plugin-defined path (after first ':')
266+ // optional output buffer for FS name (size in 'fsNameBufSize', can be NULL),
267+ // returns 'userPart' (if != NULL) - pointer into 'path' to first character
268+ // of plugin-defined path (after first ':')
269+ BOOL IsPluginFSPath (const char * path, char * fsName, int fsNameBufSize, const char ** userPart = NULL );
270+ BOOL IsPluginFSPath (char * path, char * fsName, int fsNameBufSize, char ** userPart = NULL );
271+ // legacy compatibility overloads ('fsName' must be at least MAX_PATH if non-NULL)
264272BOOL IsPluginFSPath (const char * path, char * fsName = NULL , const char ** userPart = NULL );
265273BOOL IsPluginFSPath (char * path, char * fsName = NULL , char ** userPart = NULL );
266274
@@ -272,8 +280,9 @@ BOOL IsFileURLPath(const char* path);
272280int IsFileLink (const char * fileExtension);
273281
274282// gets both UNC and normal root path from 'path', returns path in 'root' in format 'C:\' or '\\SERVER\SHARE\',
275- // returns number of characters in root path (without null-terminator); 'root' is buffer of at least MAX_PATH characters, for longer
276- // UNC root paths truncates to MAX_PATH-2 characters and adds backslash (either way it's not 100% a root path)
283+ // returns number of characters in root path (without null-terminator)
284+ int GetRootPath (char * root, int rootBufSize, const char * path);
285+ // legacy compatibility overload ('root' must be at least MAX_PATH)
277286int GetRootPath (char * root, const char * path);
278287
279288// returns pointer after root (more precisely to backslash right after root) of both UNC and normal path 'path'
@@ -883,8 +892,11 @@ BOOL ResolveSubsts(char* resPath);
883892
884893// Performs resolve of subst and reparse point for path 'path', then attempts to get GUID path
885894// for the mount-point of the path (if missing, for the root of the path). Returns FALSE on failure.
886- // On success, returns TRUE and sets 'mountPoint' and 'guidPath' (if different from NULL, must
887- // point to buffers of size at least MAX_PATH; strings will be terminated with backslash).
895+ // On success, returns TRUE and sets 'mountPoint' and 'guidPath' (if non-NULL; sizes are in
896+ // 'mountPointBufSize' and 'guidPathBufSize'; strings are terminated with backslash).
897+ BOOL GetResolvedPathMountPointAndGUID (const char * path, char * mountPoint, int mountPointBufSize,
898+ char * guidPath, int guidPathBufSize);
899+ // legacy compatibility overloads ('mountPoint'/'guidPath' must be at least MAX_PATH if non-NULL)
888900BOOL GetResolvedPathMountPointAndGUID (const char * path, char * mountPoint, char * guidPath);
889901
890902// attempt to return correct values (also handles reparse points - complete path is specified instead of root)
@@ -921,6 +933,8 @@ BOOL GetReparsePointDestination(const char* repPointDir, char* repPointDstBuf, D
921933// in 'currentReparsePoint' (at least MAX_PATH characters) returns current (last) local
922934// reparse point, on failure returns classic root; returns FALSE on failure; if
923935// 'error' is not NULL, TRUE is written to it on error
936+ BOOL GetCurrentLocalReparsePoint (const char * path, char * currentReparsePoint, int currentReparsePointBufSize, BOOL * error = NULL );
937+ // legacy compatibility overload ('currentReparsePoint' must be at least MAX_PATH)
924938BOOL GetCurrentLocalReparsePoint (const char * path, char * currentReparsePoint, BOOL * error = NULL );
925939
926940// call only for paths 'path' whose root (after removing subst) is DRIVE_FIXED (elsewhere it makes no sense to search for
@@ -2369,8 +2383,10 @@ void ShellActionAux6(CFilesWindow* panel);
23692383
23702384// ******************************************************************************
23712385
2372- // returns in 'path' (buffer at least MAX_PATH characters) the path Configuration.IfPathIsInaccessibleGoTo;
2386+ // returns in 'path' the path Configuration.IfPathIsInaccessibleGoTo;
23732387// takes into account Configuration.IfPathIsInaccessibleGoToIsMyDocs setting
2388+ void GetIfPathIsInaccessibleGoTo (char * path, int pathBufSize, BOOL forceIsMyDocs);
2389+ // legacy compatibility overload ('path' must be at least 2 * MAX_PATH)
23742390void GetIfPathIsInaccessibleGoTo (char * path, BOOL forceIsMyDocs = FALSE );
23752391
23762392// loads icon overlay handler configuration from registry configuration
@@ -2399,19 +2415,25 @@ BOOL RestoreNetworkConnection(HWND parent, const char* name, const char* remoteN
23992415 LPNETRESOURCE lpNetResource = NULL );
24002416
24012417// constructs text for Type column in panel for unassociated file (e.g. "AAA File" or "File")
2418+ void GetCommonFileTypeStr (char * buf, int bufSize, int * resLen, const char * ext);
2419+ // legacy compatibility overload ('buf' must be at least TRANSFER_BUFFER_MAX)
24022420void GetCommonFileTypeStr (char * buf, int * resLen, const char * ext);
24032421
24042422// finds doubled separators and removes unnecessary ones (on Vista I encountered doubled
24052423// separators in context menu on .bar files)
24062424void RemoveUselessSeparatorsFromMenu (HMENU h);
24072425
2408- // returns "Open Salamander" directory on path CSIDL_APPDATA in 'buf' (buffer of size MAX_PATH)
2426+ // returns "Open Salamander" directory on path CSIDL_APPDATA in 'buf'
2427+ BOOL GetOurPathInRoamingAPPDATA (char * buf, int bufSize);
2428+ // legacy compatibility overload ('buf' must be at least MAX_PATH)
24092429BOOL GetOurPathInRoamingAPPDATA (char * buf);
24102430
24112431// creates "Open Salamander" directory on path CSIDL_APPDATA; returns TRUE if path
24122432// fits in MAX_PATH (its existence is not guaranteed, CreateDirectory result is not checked);
2413- // if 'buf' is not NULL, it is buffer of size MAX_PATH , in which this path is returned
2433+ // if 'buf' is not NULL, it is output buffer of size 'bufSize' , in which this path is returned
24142434// WARNING: use only Vista+
2435+ BOOL CreateOurPathInRoamingAPPDATA (char * buf, int bufSize);
2436+ // legacy compatibility overload ('buf' must be at least MAX_PATH if non-NULL)
24152437BOOL CreateOurPathInRoamingAPPDATA (char * buf);
24162438
24172439#ifndef _WIN64
0 commit comments