diff options
-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) { |