Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
64e047fe
Commit
64e047fe
authored
Oct 25, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of FILE_ATTRIBUTE_SYMLINK (based on a patch by Bill Medland).
parent
5a11b009
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
13 deletions
+11
-13
directory.c
files/directory.c
+1
-1
dos_fs.c
files/dos_fs.c
+4
-4
drive.c
files/drive.c
+1
-1
file.c
files/file.c
+4
-5
file.h
include/file.h
+1
-1
winnt.h
include/winnt.h
+0
-1
No files found.
files/directory.c
View file @
64e047fe
...
@@ -80,7 +80,7 @@ static int DIR_GetPath( LPCWSTR keyname, LPCWSTR defval, DOS_FULL_NAME *full_nam
...
@@ -80,7 +80,7 @@ static int DIR_GetPath( LPCWSTR keyname, LPCWSTR defval, DOS_FULL_NAME *full_nam
PROFILE_GetWineIniString
(
wineW
,
keyname
,
defval
,
path
,
MAX_PATHNAME_LEN
);
PROFILE_GetWineIniString
(
wineW
,
keyname
,
defval
,
path
,
MAX_PATHNAME_LEN
);
if
(
!
DOSFS_GetFullName
(
path
,
TRUE
,
full_name
)
||
if
(
!
DOSFS_GetFullName
(
path
,
TRUE
,
full_name
)
||
(
!
FILE_Stat
(
full_name
->
long_name
,
&
info
)
&&
(
mess
=
strerror
(
errno
)))
||
(
!
FILE_Stat
(
full_name
->
long_name
,
&
info
,
NULL
)
&&
(
mess
=
strerror
(
errno
)))
||
(
!
(
info
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
&&
(
mess
=
"not a directory"
))
||
(
!
(
info
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
&&
(
mess
=
"not a directory"
))
||
(
!
(
GetLongPathNameW
(
full_name
->
short_name
,
longname
,
longname_len
)))
)
(
!
(
GetLongPathNameW
(
full_name
->
short_name
,
longname
,
longname_len
)))
)
{
{
...
...
files/dos_fs.c
View file @
64e047fe
...
@@ -1696,7 +1696,7 @@ BOOL WINAPI wine_get_unix_file_name( LPCSTR dos, LPSTR buffer, DWORD len )
...
@@ -1696,7 +1696,7 @@ BOOL WINAPI wine_get_unix_file_name( LPCSTR dos, LPSTR buffer, DWORD len )
*/
*/
static
int
DOSFS_FindNextEx
(
FIND_FIRST_INFO
*
info
,
WIN32_FIND_DATAW
*
entry
)
static
int
DOSFS_FindNextEx
(
FIND_FIRST_INFO
*
info
,
WIN32_FIND_DATAW
*
entry
)
{
{
DWORD
attr
=
info
->
attr
|
FA_UNUSED
|
FA_ARCHIVE
|
FA_RDONLY
|
FILE_ATTRIBUTE_SYMLINK
;
DWORD
attr
=
info
->
attr
|
FA_UNUSED
|
FA_ARCHIVE
|
FA_RDONLY
;
UINT
flags
=
DRIVE_GetFlags
(
info
->
drive
);
UINT
flags
=
DRIVE_GetFlags
(
info
->
drive
);
char
*
p
,
buffer
[
MAX_PATHNAME_LEN
];
char
*
p
,
buffer
[
MAX_PATHNAME_LEN
];
const
char
*
drive_path
;
const
char
*
drive_path
;
...
@@ -1704,6 +1704,7 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAW *entry )
...
@@ -1704,6 +1704,7 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAW *entry )
LPCWSTR
long_name
,
short_name
;
LPCWSTR
long_name
,
short_name
;
BY_HANDLE_FILE_INFORMATION
fileinfo
;
BY_HANDLE_FILE_INFORMATION
fileinfo
;
WCHAR
dos_name
[
13
];
WCHAR
dos_name
[
13
];
BOOL
is_symlink
;
if
((
info
->
attr
&
~
(
FA_UNUSED
|
FA_ARCHIVE
|
FA_RDONLY
))
==
FA_LABEL
)
if
((
info
->
attr
&
~
(
FA_UNUSED
|
FA_ARCHIVE
|
FA_RDONLY
))
==
FA_LABEL
)
{
{
...
@@ -1765,13 +1766,12 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAW *entry )
...
@@ -1765,13 +1766,12 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAW *entry )
/* Check the file attributes */
/* Check the file attributes */
WideCharToMultiByte
(
DRIVE_GetCodepage
(
info
->
drive
),
0
,
long_name
,
-
1
,
WideCharToMultiByte
(
DRIVE_GetCodepage
(
info
->
drive
),
0
,
long_name
,
-
1
,
p
,
sizeof
(
buffer
)
-
(
int
)(
p
-
buffer
),
NULL
,
NULL
);
p
,
sizeof
(
buffer
)
-
(
int
)(
p
-
buffer
),
NULL
,
NULL
);
if
(
!
FILE_Stat
(
buffer
,
&
fileinfo
))
if
(
!
FILE_Stat
(
buffer
,
&
fileinfo
,
&
is_symlink
))
{
{
WARN
(
"can't stat %s
\n
"
,
buffer
);
WARN
(
"can't stat %s
\n
"
,
buffer
);
continue
;
continue
;
}
}
if
((
fileinfo
.
dwFileAttributes
&
FILE_ATTRIBUTE_SYMLINK
)
&&
if
(
is_symlink
&&
(
fileinfo
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
))
(
fileinfo
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
))
{
{
static
const
WCHAR
wineW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
wineW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
ShowDirSymlinksW
[]
=
{
'S'
,
'h'
,
'o'
,
'w'
,
'D'
,
'i'
,
'r'
,
'S'
,
'y'
,
'm'
,
'l'
,
'i'
,
'n'
,
'k'
,
's'
,
0
};
static
const
WCHAR
ShowDirSymlinksW
[]
=
{
'S'
,
'h'
,
'o'
,
'w'
,
'D'
,
'i'
,
'r'
,
'S'
,
'y'
,
'm'
,
'l'
,
'i'
,
'n'
,
'k'
,
's'
,
0
};
...
...
files/drive.c
View file @
64e047fe
...
@@ -1104,7 +1104,7 @@ int DRIVE_Chdir( int drive, LPCWSTR path )
...
@@ -1104,7 +1104,7 @@ int DRIVE_Chdir( int drive, LPCWSTR path )
buffer
[
MAX_PATHNAME_LEN
-
1
]
=
0
;
/* ensure 0 termination */
buffer
[
MAX_PATHNAME_LEN
-
1
]
=
0
;
/* ensure 0 termination */
if
(
!
DOSFS_GetFullName
(
buffer
,
TRUE
,
&
full_name
))
return
0
;
if
(
!
DOSFS_GetFullName
(
buffer
,
TRUE
,
&
full_name
))
return
0
;
if
(
!
FILE_Stat
(
full_name
.
long_name
,
&
info
))
return
0
;
if
(
!
FILE_Stat
(
full_name
.
long_name
,
&
info
,
NULL
))
return
0
;
if
(
!
(
info
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
))
if
(
!
(
info
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
))
{
{
SetLastError
(
ERROR_FILE_NOT_FOUND
);
SetLastError
(
ERROR_FILE_NOT_FOUND
);
...
...
files/file.c
View file @
64e047fe
...
@@ -734,7 +734,7 @@ static void FILE_FillInfo( struct stat *st, BY_HANDLE_FILE_INFORMATION *info )
...
@@ -734,7 +734,7 @@ static void FILE_FillInfo( struct stat *st, BY_HANDLE_FILE_INFORMATION *info )
*
*
* Stat a Unix path name. Return TRUE if OK.
* Stat a Unix path name. Return TRUE if OK.
*/
*/
BOOL
FILE_Stat
(
LPCSTR
unixName
,
BY_HANDLE_FILE_INFORMATION
*
info
)
BOOL
FILE_Stat
(
LPCSTR
unixName
,
BY_HANDLE_FILE_INFORMATION
*
info
,
BOOL
*
is_symlink_ptr
)
{
{
struct
stat
st
;
struct
stat
st
;
int
is_symlink
;
int
is_symlink
;
...
@@ -759,7 +759,6 @@ BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
...
@@ -759,7 +759,6 @@ BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
/* fill in the information we gathered so far */
/* fill in the information we gathered so far */
FILE_FillInfo
(
&
st
,
info
);
FILE_FillInfo
(
&
st
,
info
);
if
(
is_symlink
)
info
->
dwFileAttributes
|=
FILE_ATTRIBUTE_SYMLINK
;
/* and now see if this is a hidden file, based on the name */
/* and now see if this is a hidden file, based on the name */
p
=
strrchr
(
unixName
,
'/'
);
p
=
strrchr
(
unixName
,
'/'
);
...
@@ -774,7 +773,7 @@ BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
...
@@ -774,7 +773,7 @@ BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info )
if
(
!
show_dot_files
)
if
(
!
show_dot_files
)
info
->
dwFileAttributes
|=
FILE_ATTRIBUTE_HIDDEN
;
info
->
dwFileAttributes
|=
FILE_ATTRIBUTE_HIDDEN
;
}
}
if
(
is_symlink_ptr
)
*
is_symlink_ptr
=
is_symlink
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -849,7 +848,7 @@ DWORD WINAPI GetFileAttributesW( LPCWSTR name )
...
@@ -849,7 +848,7 @@ DWORD WINAPI GetFileAttributesW( LPCWSTR name )
}
}
if
(
!
DOSFS_GetFullName
(
name
,
TRUE
,
&
full_name
)
)
if
(
!
DOSFS_GetFullName
(
name
,
TRUE
,
&
full_name
)
)
return
-
1
;
return
-
1
;
if
(
!
FILE_Stat
(
full_name
.
long_name
,
&
info
))
return
-
1
;
if
(
!
FILE_Stat
(
full_name
.
long_name
,
&
info
,
NULL
))
return
-
1
;
return
info
.
dwFileAttributes
;
return
info
.
dwFileAttributes
;
}
}
...
@@ -3361,7 +3360,7 @@ BOOL WINAPI GetFileAttributesExW(
...
@@ -3361,7 +3360,7 @@ BOOL WINAPI GetFileAttributesExW(
LPWIN32_FILE_ATTRIBUTE_DATA
lpFad
=
LPWIN32_FILE_ATTRIBUTE_DATA
lpFad
=
(
LPWIN32_FILE_ATTRIBUTE_DATA
)
lpFileInformation
;
(
LPWIN32_FILE_ATTRIBUTE_DATA
)
lpFileInformation
;
if
(
!
DOSFS_GetFullName
(
lpFileName
,
TRUE
,
&
full_name
))
return
FALSE
;
if
(
!
DOSFS_GetFullName
(
lpFileName
,
TRUE
,
&
full_name
))
return
FALSE
;
if
(
!
FILE_Stat
(
full_name
.
long_name
,
&
info
))
return
FALSE
;
if
(
!
FILE_Stat
(
full_name
.
long_name
,
&
info
,
NULL
))
return
FALSE
;
lpFad
->
dwFileAttributes
=
info
.
dwFileAttributes
;
lpFad
->
dwFileAttributes
=
info
.
dwFileAttributes
;
lpFad
->
ftCreationTime
=
info
.
ftCreationTime
;
lpFad
->
ftCreationTime
=
info
.
ftCreationTime
;
...
...
include/file.h
View file @
64e047fe
...
@@ -73,7 +73,7 @@ extern int FILE_strcasecmp( const char *str1, const char *str2 );
...
@@ -73,7 +73,7 @@ extern int FILE_strcasecmp( const char *str1, const char *str2 );
extern
int
FILE_strncasecmp
(
const
char
*
str1
,
const
char
*
str2
,
int
len
);
extern
int
FILE_strncasecmp
(
const
char
*
str1
,
const
char
*
str2
,
int
len
);
extern
void
FILE_SetDosError
(
void
);
extern
void
FILE_SetDosError
(
void
);
extern
int
FILE_GetUnixHandle
(
HANDLE
handle
,
DWORD
access
);
extern
int
FILE_GetUnixHandle
(
HANDLE
handle
,
DWORD
access
);
extern
BOOL
FILE_Stat
(
LPCSTR
unixName
,
BY_HANDLE_FILE_INFORMATION
*
info
);
extern
BOOL
FILE_Stat
(
LPCSTR
unixName
,
BY_HANDLE_FILE_INFORMATION
*
info
,
BOOL
*
is_symlink
);
extern
HFILE16
FILE_Dup2
(
HFILE16
hFile1
,
HFILE16
hFile2
);
extern
HFILE16
FILE_Dup2
(
HFILE16
hFile1
,
HFILE16
hFile2
);
extern
HANDLE
FILE_CreateFile
(
LPCSTR
filename
,
DWORD
access
,
DWORD
sharing
,
extern
HANDLE
FILE_CreateFile
(
LPCSTR
filename
,
DWORD
access
,
DWORD
sharing
,
LPSECURITY_ATTRIBUTES
sa
,
DWORD
creation
,
LPSECURITY_ATTRIBUTES
sa
,
DWORD
creation
,
...
...
include/winnt.h
View file @
64e047fe
...
@@ -3309,7 +3309,6 @@ typedef enum tagSID_NAME_USE {
...
@@ -3309,7 +3309,6 @@ typedef enum tagSID_NAME_USE {
#define FILE_ATTRIBUTE_XACTION_WRITE 0x00000400L
#define FILE_ATTRIBUTE_XACTION_WRITE 0x00000400L
#define FILE_ATTRIBUTE_COMPRESSED 0x00000800L
#define FILE_ATTRIBUTE_COMPRESSED 0x00000800L
#define FILE_ATTRIBUTE_OFFLINE 0x00001000L
#define FILE_ATTRIBUTE_OFFLINE 0x00001000L
#define FILE_ATTRIBUTE_SYMLINK 0x80000000L
/* Not in Windows API */
/* File notification flags */
/* File notification flags */
#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
...
...
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