summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_action.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_action.cpp')
-rw-r--r--core/fpdfdoc/cpdf_action.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/core/fpdfdoc/cpdf_action.cpp b/core/fpdfdoc/cpdf_action.cpp
index b40fdcd225..88d0781e80 100644
--- a/core/fpdfdoc/cpdf_action.cpp
+++ b/core/fpdfdoc/cpdf_action.cpp
@@ -73,21 +73,16 @@ CFX_WideString CPDF_Action::GetFilePath() const {
}
CPDF_Object* pFile = m_pDict->GetDirectObjectFor("F");
- CFX_WideString path;
- if (!pFile) {
- if (type == "Launch") {
- CPDF_Dictionary* pWinDict = m_pDict->GetDictFor("Win");
- if (pWinDict) {
- return CFX_WideString::FromLocal(
- pWinDict->GetStringFor("F").AsStringC());
- }
+ if (pFile)
+ return CPDF_FileSpec(pFile).GetFileName();
+
+ if (type == "Launch") {
+ CPDF_Dictionary* pWinDict = m_pDict->GetDictFor("Win");
+ if (pWinDict) {
+ return CFX_WideString::FromLocal(pWinDict->GetStringFor("F").AsStringC());
}
- return path;
}
-
- CPDF_FileSpec filespec(pFile);
- filespec.GetFileName(&path);
- return path;
+ return CFX_WideString();
}
CFX_ByteString CPDF_Action::GetURI(CPDF_Document* pDoc) const {