summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-05-25 08:53:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-05-25 08:53:52 +0100
commit6f531db266857c7f4371687da3694b0b2fe5aa16 (patch)
treee6cdaf0276e83b8ea3519ec0ce68b92aadbe6ec9 /desktop
parentf6a80c4dee246bbe682d324339731c6e6e5740cb (diff)
add salhelper::LinkResolver
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index ae20039bf218..367985ffd577 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -52,6 +52,7 @@
#include "boost/scoped_array.hpp"
#include "boost/shared_ptr.hpp"
#include <comphelper/processfactory.hxx>
+#include <salhelper/linkhelper.hxx>
#ifdef WNT
#define UNICODE
@@ -145,18 +146,13 @@ bool existsOfficePipe()
//get modification time
static bool getModifyTimeTargetFile(const OUString &rFileURL, TimeValue &rTime)
{
- ::osl::DirectoryItem item;
- if (::osl::DirectoryItem::get(rFileURL, item) != ::osl::File::E_None)
- return false;
+ salhelper::LinkResolver aResolver(osl_FileStatus_Mask_ModifyTime);
- ::osl::FileStatus stat(osl_FileStatus_Mask_ModifyTime|osl_FileStatus_Mask_Type|osl_FileStatus_Mask_LinkTargetURL);
- if (item.getFileStatus(stat) != ::osl::File::E_None)
+ if (aResolver.fetchFileStatus(rFileURL) != osl::FileBase::E_None)
return false;
- if( stat.getFileType() == ::osl::FileStatus::Link )
- return getModifyTimeTargetFile(stat.getLinkTargetURL(), rTime);
+ rTime = aResolver.m_aStatus.getModifyTime();
- rTime = stat.getModifyTime();
return true;
}