Mercurial and Git clients can push and pull from this alias URL to interact with this repository. You can change to which repository an alias points by going to the Aliases link on the project page.
#include "stdafx.h"#include "ShellExt.h"#include "TortoiseUtils.h"#include "StringUtils.h"#include "QueryDirstate.h"#include "RegistryConfig.h"#include "CShellExtOverlay.h"#include <shlwapi.h>STDMETHODIMPCShellExtOverlay::GetOverlayInfo(LPWSTRpwszIconFile,intcchMax,int*pIndex,DWORD*pdwFlags){TDEBUG_TRACE("CShellExtOverlay::GetOverlayInfo: myTortoiseClass = "<<myTortoiseClass);// icons are determined by TortoiseOverlays shim*pIndex=0;*pdwFlags=0;*pwszIconFile=0;returnS_OK;}STDMETHODIMPCShellExtOverlay::GetPriority(int*pPriority){*pPriority=1;returnS_OK;}STDMETHODIMPCShellExtOverlay::IsMemberOf(LPCWSTRpwszPath,DWORD/* dwAttrib */){ThgCriticalSectioncs(CShellExt::GetCriticalSection());std::stringcval;if(GetRegistryConfig("EnableOverlays",cval)!=0&&cval=="0")returnS_FALSE;// This overlay handler processes all filenames in lowercase, so that a path// "C:\FOO\BAR\Baz.TXT" will be considered equal to "C:\foo\bar\baz.txt"// (note that mercurial preserves the case of filenames in .hg/dirstate)std::wstringlowerpath(pwszPath);::CharLowerW(const_cast<wchar_t*>(lowerpath.c_str())); std::string path = WideToMultibyte(lowerpath.c_str());
- if (GetRegistryConfig("LocalDisksOnly", cval) != 0 && cval != "0"
- && PathIsNetworkPath(path.c_str()))
- return S_FALSE;
+ if (GetRegistryConfig("LocalDisksOnly", cval) != 0 && cval != "0")+ {+ if (::PathIsNetworkPath(path.c_str()))
+return S_FALSE;
++ if (path.size() > 2 && path[1] == ':')+ {+ std::string t = "C:\\";+ t[0] = path[0];+ if (::GetDriveType(t.c_str()) == 4)+ return S_FALSE;+ }+ } char filterStatus = 0;
if (myTortoiseClass == 'A')
filterStatus='A';charstatus=0;if(!HgQueryDirstate(myTortoiseClass,path,filterStatus,status))returnS_FALSE;if(status==myTortoiseClass)returnS_OK;returnS_FALSE;}CShellExtOverlay::CShellExtOverlay(chartortoiseClass):myTortoiseClass(tortoiseClass){m_cRef=0L;CShellExt::IncDllRef();}CShellExtOverlay::~CShellExtOverlay(){CShellExt::DecDllRef();}STDMETHODIMP_(ULONG)CShellExtOverlay::AddRef(){ThgCriticalSectioncs(CShellExt::GetCriticalSection());return++m_cRef;}STDMETHODIMP_(ULONG)CShellExtOverlay::Release(){ThgCriticalSectioncs(CShellExt::GetCriticalSection());if(--m_cRef)returnm_cRef;deletethis;return0L;}STDMETHODIMPCShellExtOverlay::QueryInterface(REFIIDriid,LPVOIDFAR*ppv){if(ppv==0)returnE_POINTER;*ppv=NULL;if(IsEqualIID(riid,IID_IShellIconOverlayIdentifier)||IsEqualIID(riid,IID_IUnknown)){*ppv=(IShellIconOverlayIdentifier*)this;}if(*ppv){AddRef();returnS_OK;}returnE_NOINTERFACE;}
Attach a Trello Card
Add a tag
Your session has expired
You are no longer logged in. Please log in and try your request again.
Filter RSS Feed
This RSS feed URL allows you to see the contents of your current filter using any feed reader.
This link includes a special authentication token. If you share the URL with anyone else, they can see this RSS feed's activity. You can disable these tokens when needed.
Your current filter is unsaved; changing it won't affect this RSS feed.