Page 1 of 1

DelNode "... a better DeleteDirectory"

Posted: Wed May 28, 2008 3:32 pm
by bingo

Code: Select all

Import "advpack.lib"
DelNode(path.l,flag.l)
EndImport
;for deleting c:\temp !!!
Debug DelNode(@"c:\temp",0) ; 0 = ok
the problem: DeleteDirectory (with #PB_FileSystem_Recursive) doesn't delete unicode-folders (if non-unicode exe) :(

Posted: Wed May 28, 2008 3:36 pm
by Fred
Sounds like a bug, could you post a snippet showing the failing ?

Posted: Wed May 28, 2008 3:49 pm
by bingo
create folder d:\temp and 3 subfolders

\Интернете
\Поиск
\test

run:
Debug DeleteDirectory("d:\temp","*.*",#PB_FileSystem_Recursive) ; =0

d:\temp\Интернете
d:\temp\Поиск

only d:\temp\test is missing ... :(

run , if unicode exe:
Debug DeleteDirectory("d:\temp","*.*",#PB_FileSystem_Recursive) ; =1 :wink:

the same problem with CopyDirectory ...
non unicode exe can not handle unicode subfolders/files (it is normal ... :cry: )

Posted: Wed May 28, 2008 8:21 pm
by Fred
and if you compiles in unicode mode ?

Posted: Thu May 29, 2008 7:21 am
by bingo
@fred

deletedirectory/copydirectory:

if program is compiled in unicode mode it works with unicode and non unicode folders/files .

if not ... it works with non unicode folders/files only !

Posted: Thu May 29, 2008 11:03 am
by Fred
make sens..