Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
5bb66d73
Commit
5bb66d73
authored
Jan 25, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32 opendir: remove broken and obsolete special mode
parent
28085c76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
36 deletions
+4
-36
src/win32/filesystem.c
src/win32/filesystem.c
+4
-36
No files found.
src/win32/filesystem.c
View file @
5bb66d73
...
@@ -127,11 +127,7 @@ char *vlc_getcwd (void)
...
@@ -127,11 +127,7 @@ char *vlc_getcwd (void)
typedef
struct
vlc_DIR
typedef
struct
vlc_DIR
{
{
_WDIR
*
wdir
;
/* MUST be first, see <vlc_fs.h> */
_WDIR
*
wdir
;
/* MUST be first, see <vlc_fs.h> */
union
bool
insert_dot_dot
;
{
DWORD
drives
;
bool
insert_dot_dot
;
}
u
;
}
vlc_DIR
;
}
vlc_DIR
;
...
@@ -148,17 +144,8 @@ DIR *vlc_opendir (const char *dirname)
...
@@ -148,17 +144,8 @@ DIR *vlc_opendir (const char *dirname)
return
NULL
;
return
NULL
;
}
}
if
(
wpath
[
0
]
==
L'\0'
||
(
wcscmp
(
wpath
,
L"
\\
"
)
==
0
))
{
free
(
wpath
);
/* Special mode to list drive letters */
p_dir
->
wdir
=
NULL
;
p_dir
->
u
.
drives
=
GetLogicalDrives
();
return
(
void
*
)
p_dir
;
}
assert
(
wpath
[
0
]);
// wpath[1] is defined
assert
(
wpath
[
0
]);
// wpath[1] is defined
p_dir
->
u
.
insert_dot_dot
=
!
wcscmp
(
wpath
+
1
,
L":
\\
"
);
p_dir
->
insert_dot_dot
=
!
wcscmp
(
wpath
+
1
,
L":
\\
"
);
_WDIR
*
wdir
=
_wopendir
(
wpath
);
_WDIR
*
wdir
=
_wopendir
(
wpath
);
free
(
wpath
);
free
(
wpath
);
...
@@ -175,29 +162,10 @@ char *vlc_readdir (DIR *dir)
...
@@ -175,29 +162,10 @@ char *vlc_readdir (DIR *dir)
{
{
vlc_DIR
*
p_dir
=
(
vlc_DIR
*
)
dir
;
vlc_DIR
*
p_dir
=
(
vlc_DIR
*
)
dir
;
if
(
p_dir
->
wdir
==
NULL
)
if
(
p_dir
->
insert_dot_dot
)
{
/* Drive letters mode */
DWORD
drives
=
p_dir
->
u
.
drives
;
if
(
drives
==
0
)
return
NULL
;
/* end */
unsigned
int
i
;
for
(
i
=
0
;
!
(
drives
&
1
);
i
++
)
drives
>>=
1
;
p_dir
->
u
.
drives
&=
~
(
1UL
<<
i
);
assert
(
i
<
26
);
char
*
ret
;
if
(
asprintf
(
&
ret
,
"%c:
\\
"
,
'A'
+
i
)
==
-
1
)
return
NULL
;
return
ret
;
}
if
(
p_dir
->
u
.
insert_dot_dot
)
{
{
/* Adds "..", gruik! */
/* Adds "..", gruik! */
p_dir
->
u
.
insert_dot_dot
=
false
;
p_dir
->
insert_dot_dot
=
false
;
return
strdup
(
".."
);
return
strdup
(
".."
);
}
}
...
...
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