We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef7fea0 commit af02175Copy full SHA for af02175
fsexists.c
@@ -38,14 +38,21 @@ int path_exists(char *pathname)
38
39
if (pathname[0] != '\0')
40
{
41
+ size_t len = strlen(pathname);
42
+ int trailing_backslash = pathname[len-1] == '\\';
43
+
44
+ if (trailing_backslash)
45
+ pathname[len-1] = '\0';
46
47
if ((attr = Fattrib(pathname, 0, 0)) >= 0 && (attr & FA_DIR) != 0)
48
r = TRUE;
49
- /* Work-around fr MagiCPC, wo der stat(<Laufwerk>) nicht funkt! */
50
51
+ pathname[len-1] = '\\';
52
53
+ /* Work-around fuer MagiCPC, wo der stat(<Laufwerk>) nicht funkt! */
54
if (cf_magxPC && !r)
55
- int len = (int)strlen(pathname);
-
56
if (pathname[1] == ':' && len <= 3) /* nur Laufwerk 'X:' oder 'X:\' */
57
58
char p[80];
0 commit comments