Skip to content

Commit

Permalink
add -nr switch for non-recursive folder scan
Browse files Browse the repository at this point in the history
  • Loading branch information
tigros committed Feb 4, 2025
1 parent ba619f4 commit ea9fcac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions updatedb/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@ static SQLiteConnection CreateConnection()
static string getsql()
{
string drive = "#$" + glbrootfolder[0];
string folder = glbrootfolder.Replace("'", "''");
string sql;
if (glbnr)
sql = basesqlnr.Replace("{}", glbrootfolder);
sql = basesqlnr.Replace("{}", folder);
else if (glbrootfolder.Length > 3)
sql = basesql.Replace("{}", '"' + glbrootfolder.Replace(":", "").Replace('\\', ' ').Replace("'", "''") + "\" " + drive);
sql = basesql.Replace("{}", '"' + folder.Replace(":", "").Replace('\\', ' ') + "\" " + drive);
else
sql = basesql.Replace("{}", drive);
return sql;
Expand Down

0 comments on commit ea9fcac

Please sign in to comment.