Hi Rick,
FYI about running usersecuritymanager_addtoproject.prg.
We have SET EXACT ON as our default, so GetDirs() fails in this statement:
if AT("D",laDirs[x,5]) = 0 OR laDirs[x,1] = "." OR laDirs[x,1] = " "
because it interprets ".." as a valid subdirectory.
Alex
Not sure what you mean.
? laDirs[x,1] = "."
is a single character that is checked. Since ..
starts with a .
and the it's a single character and therefore exact match, it'll be detected in that list?
Where is this happening exactly?
+++ Rick ---
The failure happens in GetDirs(). Because GetDirs() assumes that SET("EXACT") = .F. and it in fact is true as our shop standard, the code in GetDirs() interprets ".." as a directory that should be added to the cursor and goes into infinite loop.
Actually unimportant, but thought I'd mention it.
Alex
Well I think SET EXACT ON
may cause some problems in Web Connection in general because there are lots of places where searches use exact scanning searches. The reasoning for that is in the documentation... in hindsight better planning in the early days would have been better but hindsight is always 20/20...
+++ Rick ---
Code should work like this regardless of SET EXACT
setting:
lnFiles = aDir(laDirs,ADDBS(lcPath) + "*.*" ,"D",1)
FOR x=1 to lnFiles
IF AT("D",laDirs[x,5]) = 0 OR ;
EMPTY(laDirs[x,1]) OR ;
SUBSTR(laDirs[x,1],1) = "."
LOOP
ENDIF
GetDirs( ADDBS(lcPath + laDirs[x,1]),lcBase )
ENDFOR
It is easier to be a historian than a prophet.
It is easier to be a historian than a prophet.
LOL!
Nah - in today's world prophets suffer no consequences for being wrong...
In the old days they used to string up the prophets if they were too far off the mark, which seems like a good incentive to be thorough... 😄
+++ Rick ---