Returns the path of the parent directory of all selected files. @return Parent directory path.
| 710 | // @return Parent directory path. |
| 711 | // |
| 712 | std::wstring CPathCopyCopyContextMenuExt::GetParentPath() const |
| 713 | { |
| 714 | std::wstring parentPath; |
| 715 | |
| 716 | // Extract the parent path of the first file. We'll assume that all |
| 717 | // files have the same parent. This might not be strictly true in all |
| 718 | // cases (for example, in a custom shell view) but we're only using it |
| 719 | // for validation purposes, so it's good enough. |
| 720 | if (!m_vFiles.empty()) { |
| 721 | parentPath = m_vFiles.front(); |
| 722 | PCC::PluginUtils::ExtractFolderFromPath(parentPath); |
| 723 | } |
| 724 | |
| 725 | return parentPath; |
| 726 | } |
| 727 | |
| 728 | // |
| 729 | // Adds a new item to the given menu (either the main contextual menu or |