diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-05-24 15:49:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-05-24 15:49:45 +0100 |
commit | 71d97cfc1eaf17cb35e4c00231c5b9e8af536713 (patch) | |
tree | 99cb9be5dd14262f6be50e9944562e2416b4de7b /jvmfwk | |
parent | c2e70ccda674e1ebadc0c57da2104a42dd148e59 (diff) |
resolve symbolic links to jvm dirs for especially smoketest inside ooenv
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 4ffd415ef9b3..8a32cb3f4133 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -835,6 +835,17 @@ OUString resolveDirPath(const OUString & path) osl_FileStatus_Mask_LinkTargetURL | osl_FileStatus_Mask_FileURL); + int nDepth = 0; + while (item.getFileStatus(status) == File::E_None && + status.getFileType() == FileStatus::Link) + { + if (++nDepth == 128) + break; + sResolved = status.getLinkTargetURL(); + if (DirectoryItem::get(sResolved, item) != File::E_None) + break; + } + if (item.getFileStatus(status) == File::E_None && status.getFileType() == FileStatus::Directory) { |