Пример #1
0
        public bool Mount(string repoRoot)
        {
            string error;
            string warning;

            if (!GvFltFilter.IsHealthy(out error, out warning, this.tracer))
            {
                return(false);
            }

            this.CheckAntiVirusExclusion(this.tracer, repoRoot);

            string unusedMessage;

            if (!GvFltFilter.TryAttach(this.tracer, repoRoot, out unusedMessage))
            {
                return(false);
            }

            if (!this.CallGVFSMount(repoRoot))
            {
                this.tracer.RelatedError("Unable to start the GVFS.Mount process.");
                return(false);
            }

            string errorMessage;

            if (!GVFSEnlistment.WaitUntilMounted(repoRoot, out errorMessage))
            {
                this.tracer.RelatedError(errorMessage);
                return(false);
            }

            return(true);
        }
Пример #2
0
        protected void CheckGVFltHealthy()
        {
            string error;

            if (!GvFltFilter.IsHealthy(out error, tracer: null))
            {
                this.ReportErrorAndExit(tracer: null, error: error);
            }
        }
Пример #3
0
        protected void CheckGVFltHealthy()
        {
            string error;
            string warning;

            if (!GvFltFilter.IsHealthy(out error, out warning, tracer: null))
            {
                this.ReportErrorAndExit(error);
            }

            if (!string.IsNullOrEmpty(warning))
            {
                this.Output.WriteLine(warning);
            }
        }
Пример #4
0
        public bool Mount(string repoRoot)
        {
            string error;

            if (!GvFltFilter.IsHealthy(out error, this.tracer))
            {
                return(false);
            }

            // Ensure the repo is excluded from antivirus before calling 'gvfs mount'
            // to reduce chatter between GVFS.exe and GVFS.Service.exe
            string errorMessage;
            bool   isExcluded;

            ExcludeFromAntiVirusHandler.CheckAntiVirusExclusion(this.tracer, repoRoot, out isExcluded, out errorMessage);

            string unusedMessage;

            if (!GvFltFilter.TryAttach(this.tracer, repoRoot, out unusedMessage))
            {
                return(false);
            }

            if (!this.CallGVFSMount(repoRoot))
            {
                this.tracer.RelatedError("Unable to start the GVFS.exe process.");
                return(false);
            }

            if (!GVFSEnlistment.WaitUntilMounted(repoRoot, false, out errorMessage))
            {
                this.tracer.RelatedError(errorMessage);
                return(false);
            }

            return(true);
        }