mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 04:18:18 +00:00
Merge pull request #3825 from sethjackson/modname
Windows: Remove unnecessary codepath from modname
This commit is contained in:
@@ -4331,8 +4331,6 @@ void shorten_fnames(int force)
|
|||||||
/// @return [allocated] - A new filename, made up from:
|
/// @return [allocated] - A new filename, made up from:
|
||||||
/// * fname + ext, if fname not NULL.
|
/// * fname + ext, if fname not NULL.
|
||||||
/// * current dir + ext, if fname is NULL.
|
/// * current dir + ext, if fname is NULL.
|
||||||
/// On Windows, and if ext starts with ".", a "_" is
|
|
||||||
/// preprended to ext (for filename to be valid).
|
|
||||||
/// Result is guaranteed to:
|
/// Result is guaranteed to:
|
||||||
/// * be ended by <ext>.
|
/// * be ended by <ext>.
|
||||||
/// * have a basename with at most BASENAMELEN chars:
|
/// * have a basename with at most BASENAMELEN chars:
|
||||||
@@ -4386,15 +4384,6 @@ char *modname(const char *fname, const char *ext, bool prepend_dot)
|
|||||||
char *s;
|
char *s;
|
||||||
s = ptr + strlen(ptr);
|
s = ptr + strlen(ptr);
|
||||||
|
|
||||||
#if defined(WIN3264)
|
|
||||||
// If there is no file name, and the extension starts with '.', put a
|
|
||||||
// '_' before the dot, because just ".ext" may be invalid if it's on a
|
|
||||||
// FAT partition, and on HPFS it doesn't matter.
|
|
||||||
else if ((fname == NULL || *fname == NUL) && *ext == '.') {
|
|
||||||
*s++ = '_';
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Append the extension.
|
// Append the extension.
|
||||||
// ext can start with '.' and cannot exceed 3 more characters.
|
// ext can start with '.' and cannot exceed 3 more characters.
|
||||||
strcpy(s, ext);
|
strcpy(s, ext);
|
||||||
|
Reference in New Issue
Block a user