Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d52e1c4b
Commit
d52e1c4b
authored
Feb 16, 2001
by
Gerard Patel
Committed by
Alexandre Julliard
Feb 16, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gives back the ERROR_FILE_NOT_FOUND to GetFileAttributes.
parent
4988696c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
directory.c
files/directory.c
+7
-6
dos_fs.c
files/dos_fs.c
+6
-0
file.c
files/file.c
+1
-4
No files found.
files/directory.c
View file @
d52e1c4b
...
@@ -44,7 +44,7 @@ static DOS_FULL_NAME DIR_System;
...
@@ -44,7 +44,7 @@ static DOS_FULL_NAME DIR_System;
* Get a path name from the wine.ini file and make sure it is valid.
* Get a path name from the wine.ini file and make sure it is valid.
*/
*/
static
int
DIR_GetPath
(
const
char
*
keyname
,
const
char
*
defval
,
static
int
DIR_GetPath
(
const
char
*
keyname
,
const
char
*
defval
,
DOS_FULL_NAME
*
full_name
)
DOS_FULL_NAME
*
full_name
,
BOOL
warn
)
{
{
char
path
[
MAX_PATHNAME_LEN
];
char
path
[
MAX_PATHNAME_LEN
];
BY_HANDLE_FILE_INFORMATION
info
;
BY_HANDLE_FILE_INFORMATION
info
;
...
@@ -55,7 +55,8 @@ static int DIR_GetPath( const char *keyname, const char *defval,
...
@@ -55,7 +55,8 @@ static int DIR_GetPath( const char *keyname, const char *defval,
(
!
FILE_Stat
(
full_name
->
long_name
,
&
info
)
&&
(
mess
=
strerror
(
errno
)))
||
(
!
FILE_Stat
(
full_name
->
long_name
,
&
info
)
&&
(
mess
=
strerror
(
errno
)))
||
(
!
(
info
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
&&
(
mess
=
"not a directory"
)))
(
!
(
info
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
&&
(
mess
=
"not a directory"
)))
{
{
MESSAGE
(
"Invalid path '%s' for %s directory: %s
\n
"
,
path
,
keyname
,
mess
);
if
(
warn
)
MESSAGE
(
"Invalid path '%s' for %s directory: %s
\n
"
,
path
,
keyname
,
mess
);
return
0
;
return
0
;
}
}
return
1
;
return
1
;
...
@@ -90,9 +91,9 @@ int DIR_Init(void)
...
@@ -90,9 +91,9 @@ int DIR_Init(void)
DRIVE_Chdir
(
drive
,
cwd
);
DRIVE_Chdir
(
drive
,
cwd
);
}
}
if
(
!
(
DIR_GetPath
(
"windows"
,
"c:
\\
windows"
,
&
DIR_Windows
))
||
if
(
!
(
DIR_GetPath
(
"windows"
,
"c:
\\
windows"
,
&
DIR_Windows
,
TRUE
))
||
!
(
DIR_GetPath
(
"system"
,
"c:
\\
windows
\\
system"
,
&
DIR_System
))
||
!
(
DIR_GetPath
(
"system"
,
"c:
\\
windows
\\
system"
,
&
DIR_System
,
TRUE
))
||
!
(
DIR_GetPath
(
"temp"
,
"c:
\\
windows"
,
&
tmp_dir
)))
!
(
DIR_GetPath
(
"temp"
,
"c:
\\
windows"
,
&
tmp_dir
,
TRUE
)))
{
{
PROFILE_UsageWineIni
();
PROFILE_UsageWineIni
();
return
0
;
return
0
;
...
@@ -147,7 +148,7 @@ int DIR_Init(void)
...
@@ -147,7 +148,7 @@ int DIR_Init(void)
TRACE
(
"Cwd = %c:
\\
%s
\n
"
,
TRACE
(
"Cwd = %c:
\\
%s
\n
"
,
'A'
+
drive
,
DRIVE_GetDosCwd
(
drive
)
);
'A'
+
drive
,
DRIVE_GetDosCwd
(
drive
)
);
if
(
DIR_GetPath
(
"profile"
,
""
,
&
profile_dir
))
if
(
DIR_GetPath
(
"profile"
,
""
,
&
profile_dir
,
FALSE
))
{
{
TRACE
(
"USERPROFILE= %s
\n
"
,
profile_dir
.
short_name
);
TRACE
(
"USERPROFILE= %s
\n
"
,
profile_dir
.
short_name
);
SetEnvironmentVariableA
(
"USERPROFILE"
,
profile_dir
.
short_name
);
SetEnvironmentVariableA
(
"USERPROFILE"
,
profile_dir
.
short_name
);
...
...
files/dos_fs.c
View file @
d52e1c4b
...
@@ -843,6 +843,12 @@ BOOL DOSFS_GetFullName( LPCSTR name, BOOL check_last, DOS_FULL_NAME *full )
...
@@ -843,6 +843,12 @@ BOOL DOSFS_GetFullName( LPCSTR name, BOOL check_last, DOS_FULL_NAME *full )
TRACE
(
"%s (last=%d)
\n
"
,
name
,
check_last
);
TRACE
(
"%s (last=%d)
\n
"
,
name
,
check_last
);
if
((
!*
name
)
||
(
*
name
==
'\n'
))
{
/* error code for Win98 */
SetLastError
(
ERROR_BAD_PATHNAME
);
return
FALSE
;
}
if
((
full
->
drive
=
DOSFS_GetPathDrive
(
&
name
))
==
-
1
)
return
FALSE
;
if
((
full
->
drive
=
DOSFS_GetPathDrive
(
&
name
))
==
-
1
)
return
FALSE
;
flags
=
DRIVE_GetFlags
(
full
->
drive
);
flags
=
DRIVE_GetFlags
(
full
->
drive
);
...
...
files/file.c
View file @
d52e1c4b
...
@@ -589,11 +589,8 @@ DWORD WINAPI GetFileAttributesA( LPCSTR name )
...
@@ -589,11 +589,8 @@ DWORD WINAPI GetFileAttributesA( LPCSTR name )
SetLastError
(
ERROR_INVALID_PARAMETER
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
-
1
;
return
-
1
;
}
}
if
(
!*
name
||
!
DOSFS_GetFullName
(
name
,
TRUE
,
&
full_name
))
if
(
!
DOSFS_GetFullName
(
name
,
TRUE
,
&
full_name
)
)
{
SetLastError
(
ERROR_BAD_PATHNAME
);
return
-
1
;
return
-
1
;
}
if
(
!
FILE_Stat
(
full_name
.
long_name
,
&
info
))
return
-
1
;
if
(
!
FILE_Stat
(
full_name
.
long_name
,
&
info
))
return
-
1
;
return
info
.
dwFileAttributes
;
return
info
.
dwFileAttributes
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment