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
9f88a542
Commit
9f88a542
authored
Sep 17, 2001
by
Francois Gouget
Committed by
Alexandre Julliard
Sep 17, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make relative paths of [Drive] sections relative to WINEPREFIX.
parent
7e0906f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
drive.c
files/drive.c
+22
-7
No files found.
files/drive.c
View file @
9f88a542
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
#include "wine/port.h"
#include "wine/port.h"
#include "task.h"
#include "task.h"
#include "debugtools.h"
#include "debugtools.h"
#include "wine/server.h"
DEFAULT_DEBUG_CHANNEL
(
dosfs
);
DEFAULT_DEBUG_CHANNEL
(
dosfs
);
DECLARE_DEBUG_CHANNEL
(
file
);
DECLARE_DEBUG_CHANNEL
(
file
);
...
@@ -171,23 +172,37 @@ int DRIVE_Init(void)
...
@@ -171,23 +172,37 @@ int DRIVE_Init(void)
if
(
path
[
0
])
if
(
path
[
0
])
{
{
p
=
path
+
strlen
(
path
)
-
1
;
p
=
path
+
strlen
(
path
)
-
1
;
while
((
p
>
path
)
&&
((
*
p
==
'/'
)
||
(
*
p
==
'\\'
)))
*
p
--
=
'\0'
;
while
((
p
>
path
)
&&
(
*
p
==
'/'
))
*
p
--
=
'\0'
;
if
(
!
path
[
0
])
strcpy
(
path
,
"/"
);
if
(
stat
(
path
,
&
drive_stat_buffer
))
if
(
path
[
0
]
==
'/'
)
{
drive
->
root
=
heap_strdup
(
path
);
}
else
{
/* relative paths are relative to config dir */
const
char
*
config
=
get_config_dir
();
drive
->
root
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
config
)
+
strlen
(
path
)
+
2
);
sprintf
(
drive
->
root
,
"%s/%s"
,
config
,
path
);
}
if
(
stat
(
drive
->
root
,
&
drive_stat_buffer
))
{
{
MESSAGE
(
"Could not stat %s (%s), ignoring drive %c:
\n
"
,
MESSAGE
(
"Could not stat %s (%s), ignoring drive %c:
\n
"
,
path
,
strerror
(
errno
),
'A'
+
i
);
drive
->
root
,
strerror
(
errno
),
'A'
+
i
);
HeapFree
(
GetProcessHeap
(),
0
,
drive
->
root
);
drive
->
root
=
NULL
;
continue
;
continue
;
}
}
if
(
!
S_ISDIR
(
drive_stat_buffer
.
st_mode
))
if
(
!
S_ISDIR
(
drive_stat_buffer
.
st_mode
))
{
{
MESSAGE
(
"%s is not a directory, ignoring drive %c:
\n
"
,
MESSAGE
(
"%s is not a directory, ignoring drive %c:
\n
"
,
path
,
'A'
+
i
);
drive
->
root
,
'A'
+
i
);
HeapFree
(
GetProcessHeap
(),
0
,
drive
->
root
);
drive
->
root
=
NULL
;
continue
;
continue
;
}
}
drive
->
root
=
heap_strdup
(
path
);
drive
->
dos_cwd
=
heap_strdup
(
""
);
drive
->
dos_cwd
=
heap_strdup
(
""
);
drive
->
unix_cwd
=
heap_strdup
(
""
);
drive
->
unix_cwd
=
heap_strdup
(
""
);
drive
->
type
=
DRIVE_GetDriveType
(
name
);
drive
->
type
=
DRIVE_GetDriveType
(
name
);
...
@@ -236,7 +251,7 @@ int DRIVE_Init(void)
...
@@ -236,7 +251,7 @@ int DRIVE_Init(void)
count
++
;
count
++
;
TRACE
(
"%s: path=%s type=%s label='%s' serial=%08lx "
TRACE
(
"%s: path=%s type=%s label='%s' serial=%08lx "
"flags=%08x dev=%x ino=%x
\n
"
,
"flags=%08x dev=%x ino=%x
\n
"
,
name
,
path
,
DRIVE_Types
[
drive
->
type
],
name
,
drive
->
root
,
DRIVE_Types
[
drive
->
type
],
drive
->
label_conf
,
drive
->
serial_conf
,
drive
->
flags
,
drive
->
label_conf
,
drive
->
serial_conf
,
drive
->
flags
,
(
int
)
drive
->
dev
,
(
int
)
drive
->
ino
);
(
int
)
drive
->
dev
,
(
int
)
drive
->
ino
);
}
}
...
...
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