aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Path.cpp')
-rw-r--r--lib/Support/Path.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Support/Path.cpp b/lib/Support/Path.cpp
index c3353fd0e2..3e0ee8dd86 100644
--- a/lib/Support/Path.cpp
+++ b/lib/Support/Path.cpp
@@ -140,7 +140,11 @@ sys::IdentifyFileType(const char *magic, unsigned length) {
bool
Path::isArchive() const {
- return hasMagicNumber("!<arch>\012");
+ std::string Magic;
+ if (getMagicNumber(Magic, 8))
+ if (IdentifyFileType(Magic.c_str(), Magic.length()) == Archive_FileType)
+ return true;
+ return false;
}
bool