BOOL CSmtShell::IsFatherAdd() { if(!strcmp(m_EnvPath, m_szFile[0])){ return FALSE; } char FatherPath[255]; memset(FatherPath, 0, sizeof(FatherPath)); if(!GetFatherPath(m_szFile[0], FatherPath)){ return FALSE; } if(!strcmp(m_EnvPath, FatherPath)){ return FALSE; } string StatusStr; string StatusCmd = "svn status "; StatusCmd += "\""; StatusCmd += FatherPath; StatusCmd += "\""; StatusStr += ExeCmd((char *)StatusCmd.c_str()); if(0 == StatusStr.find("A ")){ if(IsSamePath(StatusStr, FatherPath)){ return TRUE; } } return FALSE; }
bool UAutoReimportManager::AutoReimportTexture( UObject* Object, const FString& FileName ) { if (GetDefault<UEditorLoadingSavingSettings>()->bAutoReimportTextures) { if (UTexture* Texture = Cast<UTexture>(Object)) { if (IsSamePath(FReimportManager::ResolveImportFilename(Texture->SourceFilePath, Texture), FileName)) { // Prevent the texture from being compressed immediately, so the user can see the results auto SavedCompressionSetting = Texture->DeferCompression; Texture->DeferCompression = true; if (ReimportFile(Texture, FileName)) { return true; } Texture->DeferCompression = SavedCompressionSetting; } } } return false; }