Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
8b81fec8
Commit
8b81fec8
authored
Feb 13, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- memleak fix
- getcwd() unicode fix
parent
99ca63cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
modules/access_filter/timeshift.c
modules/access_filter/timeshift.c
+10
-7
No files found.
modules/access_filter/timeshift.c
View file @
8b81fec8
...
...
@@ -535,35 +535,38 @@ static char *GetTmpFilePath( access_t *p_access )
char
*
psz_dir
=
var_GetString
(
p_access
,
"timeshift-dir"
);
char
*
psz_filename_base
;
if
(
psz_dir
&&
!*
psz_dir
)
if
(
(
psz_dir
!=
NULL
)
&&
(
psz_dir
[
0
]
==
'\0'
)
)
{
free
(
psz_dir
);
psz_dir
=
0
;
psz_dir
=
NULL
;
}
if
(
!
psz_dir
)
if
(
psz_dir
==
NULL
)
{
#ifdef WIN32
char
psz_local_dir
[
MAX_PATH
];
int
i_size
;
psz_dir
=
malloc
(
MAX_PATH
+
1
);
i_size
=
GetTempPath
(
MAX_PATH
,
psz_dir
);
i_size
=
GetTempPath
(
MAX_PATH
,
psz_local_dir
);
if
(
i_size
<=
0
||
i_size
>
MAX_PATH
)
{
if
(
!
getcwd
(
psz_dir
,
MAX_PATH
)
)
strcpy
(
psz_dir
,
"c:"
);
if
(
!
getcwd
(
psz_local_dir
,
MAX_PATH
)
)
strcpy
(
psz_local_dir
,
"C:"
);
}
psz_dir
=
FromLocaleDup
(
MAX_PATH
+
1
);
/* remove last \\ if any */
if
(
psz_dir
[
strlen
(
psz_dir
)
-
1
]
==
'\\'
)
psz_dir
[
strlen
(
psz_dir
)
-
1
]
=
'\0'
;
#else
psz_dir
=
strdup
(
"/tmp"
);
#endif
}
asprintf
(
&
psz_filename_base
,
"%s/vlc-timeshift-%d-%d-"
,
psz_dir
,
getpid
(),
p_access
->
i_object_id
);
free
(
psz_dir
);
return
psz_filename_base
;
}
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