This project is read-only.


FileSelector: AddSelectedFiles forced downcase


Hi there, I found the problem lines, I download the source code and would like to update it but failed with too other issues. So can you please update this one rebuild another one.
string d2 = directoryOnDisk.ToLower();
"Path.GetDirectoryName(item).Replace(d2, directoryPathInArchive);"
I assumed you made the "d2" to lower, because String.Replace is case-senstive. To fix this one, please add below custom method ReplaceString and
"Path.GetDirectoryName(item).Replace(d2, directoryPathInArchive);"
ReplaceString( Path.GetDirectoryName( item ), d2, directoryPathInArchive, true );
then folder name should not need to rename to lower anymore.
    /// <summary>        /// Replaces a substring within a string with another substring with optional case sensitivity turned off.        /// </summary>        /// <param name="OrigString">String to do replacements on</param>        /// <param name="FindString">The string to find</param>        /// <param name="ReplaceString">The string to replace found string wiht</param>        /// <param name="CaseInsensitive">If true case insensitive search is performed</param>        /// <returns>updated string or original string if no matches</returns>        public string ReplaceString(string OrigString, string FindString, string ReplaceString, bool CaseInsensitive) {           int at1 = 0;           while( true ) {              if( CaseInsensitive )                 at1 = OrigString.IndexOf( FindString, at1, OrigString.Length - at1, StringComparison.OrdinalIgnoreCase );              else                 at1 = OrigString.IndexOf( FindString, at1 );              if( at1 == -1 )                  return OrigString;              OrigString = OrigString.Substring( 0, at1 ) + ReplaceString + OrigString.Substring( at1 + FindString.Length );              at1 += ReplaceString.Length;           }           return OrigString;        }
Closed Jun 21, 2011 at 5:04 PM by Cheeso
This is fixed in changeset 79559. The first binary to contain this fix will be v1.9.1.6


svinson wrote Jan 12, 2011 at 11:17 PM

I ran into this problem, and I can't find a workaround. Any ideas for working around it or an estimate for making fix available?

wrote Jun 20, 2011 at 10:34 PM

Cheeso wrote Jun 20, 2011 at 11:11 PM

I still don't understand the problem. What exactly IS the problem?

I see that String.ToLower() is being called in the code. I don't understand that to be a problem .
What is the symptom or error condition that is detectable by application code?

Cheeso wrote Jun 20, 2011 at 11:57 PM

ok, I see it now. It requires the use of the overload of AddSelectedEntries that accepts a dirInArchive parameter.

wrote Jun 21, 2011 at 5:04 PM

wrote Feb 22, 2013 at 2:43 AM

wrote May 16, 2013 at 1:31 PM