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
6903d514
Commit
6903d514
authored
Aug 01, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: Fix crashlog opening.
parent
175d1beb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
6 deletions
+35
-6
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+35
-6
No files found.
modules/gui/macosx/intf.m
View file @
6903d514
...
...
@@ -1991,14 +1991,43 @@ end:
-
(
IBAction
)
openCrashLog
:(
id
)
sender
{
NSString
*
o_path
=
[
@"~/Library/Logs/CrashReporter/VLC.crash.log"
stringByExpandingTildeInPath
];
NSString
*
crashReporter
=
[
@"~/Library/Logs/CrashReporter"
stringByExpandingTildeInPath
];
NSDirectoryEnumerator
*
direnum
=
[[
NSFileManager
defaultManager
]
enumeratorAtPath
:
crashReporter
];
NSString
*
fname
;
BOOL
found
=
NO
;
NSString
*
latestLog
=
nil
;
int
year
=
0
;
int
month
=
0
;
int
day
=
0
;
int
hours
=
0
;
while
(
fname
=
[
direnum
nextObject
])
{
[
direnum
skipDescendents
];
if
([
fname
hasPrefix
:
@"VLC"
]
&&
[
fname
hasSuffix
:
@"crash"
])
{
NSArray
*
compo
=
[
fname
componentsSeparatedByString
:
@"_"
];
if
(
[
compo
count
]
<
3
)
{
found
=
NO
;
break
;
}
compo
=
[[
compo
objectAtIndex
:
1
]
componentsSeparatedByString
:
@"-"
];
if
(
[
compo
count
]
<
4
)
{
found
=
NO
;
break
;
}
if
(
year
<
[[
compo
objectAtIndex
:
0
]
intValue
]
&&
month
<
[[
compo
objectAtIndex
:
1
]
intValue
]
&&
day
<
[[
compo
objectAtIndex
:
2
]
intValue
]
&&
hours
<
[[
compo
objectAtIndex
:
3
]
intValue
]
)
{
year
=
[[
compo
objectAtIndex
:
0
]
intValue
];
month
=
[[
compo
objectAtIndex
:
1
]
intValue
];
day
=
[[
compo
objectAtIndex
:
2
]
intValue
];
hours
=
[[
compo
objectAtIndex
:
3
]
intValue
];
latestLog
=
[
NSString
stringWithFormat
:
@"%@/%@"
,
crashReporter
,
fname
];
found
=
YES
;
}
}
}
if
(
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
o_path
]
)
if
(
found
&&
latestLog
&&
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
latestLog
]
)
{
[[
NSWorkspace
sharedWorkspace
]
openFile
:
o_path
withApplication:
@"Console"
];
[[
NSWorkspace
sharedWorkspace
]
openFile
:
latestLog
withApplication
:
@"Console"
];
}
else
{
...
...
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