示例#1
0
        public bool ItemSkipped(ClientItem item)
        {
            var cpath = GetCommonPath(item.FullPath, false);

            if (cpath.EndsWith("/"))
            {
                cpath = cpath.Substring(0, cpath.Length - 1);
            }

            return(ItemSkipped(cpath, item.Name) || IgnoreList.IsIgnored(cpath) || IgnoreList.IsFilteredOut(item));
        }
示例#2
0
        /// <summary>
        /// Whether the specified path should be synced. Used to filter out
        /// the webUI folder, server files, invalid file/folder-names and
        /// any user-specified ignored files.
        /// </summary>
        public bool ItemGetsSynced(string cpath)
        {
            if (cpath.EndsWith("/"))
            {
                cpath = cpath.Substring(0, cpath.Length - 1);
            }
            string aName = Common._name(cpath);

            bool b = !(IgnoreList.IsIgnored(cpath) ||
                       cpath.Contains("webint") || aName == "." || aName == ".." ||                     //web interface, current and parent folders are ignored
                       aName == ".ftpquota" || aName == "error_log" || aName.StartsWith(".bash") ||     //server files are ignored
                       !Common.IsAllowedFilename(aName) ||                                              //checks characters not allowed in windows file/folder names
                       aName.StartsWith("~ftpb_")                                                       //FTPbox-generated temporary files are ignored
                       );

            return(b);
        }