String wrote:I always get the same result
My system: German
Windows XP
PureBasic v4.02
PureZIP beta of this (April 16th, 2007) (download above)
So you say my code doesn't work for you on your system ?
It works here (NT4 sp6) ... ! Are you using FAT or NTFS ?
Note that :
- I am using MakeSureDirectoryPathExists_() to create the output path and CreateFile()/WriteData()/CloseFile() to create the file
- The code works (here)
so I don't see any obvious explanation for your problem.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
I read a huge discussion in the german PB board about this command that it does not seems to work very well. I also had problems using this command and could not get it work 100% correctly.
Tranquil wrote:About MakeSureDirectoryPathExists_():
I read a huge discussion in the german PB board about this command that it does not seems to work very well. I also had problems using this command and could not get it work 100% correctly.
So it works with WinNT4 but not with XP ?!
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
I only tried it at a XP system and could not get it work. For now I use a Procedure which do the trick. This is what I use and which seems to work just fine. (a snipped found in the german forum)
Procedure.l MakeSureDirectoryPathExistsEX(Dir$)
Protected i, b$, c$
If Right(Dir$,1)<>"\" : Dir$+"\" : EndIf
If Mid(Dir$,2,2)=":\" And FileSize(Dir$)=-1
c$=Left(Dir$,3)
For i=4 To Len(Dir$)
b$=Mid(Dir$,i,1)
c$+b$
If b$="\"
If CreateDirectory(c$)=0
ProcedureReturn #False
EndIf
EndIf
Next
EndIf
ProcedureReturn #True
EndProcedure
but regarding to the Bug-Reports section and the FileSize() Problem with networkpaths this procedure may also have problems with UNC-Paths till this one is fixed.
MakeSureDirectoryPathExists_() seems to work fine on my machine, but then I'm only using it on local devices, no fancy network stuff or anything. The CodeSync function of CodeCaddy uses it intensively.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
PSDK wrote:Requires DbgHelp.dll on Windows NT 4.0 and Windows Me/98/95.
The installation of the dll is optional by setup windows (comes with a optional program)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
For a = 1 To 4
For b = 1 To 59
File1.s = File1.s +"a"
Next b
File1.s = File1.s +"\"
Next a
File1.s = "c:\Temp\" + File1.s + "My.txt"
Debug Str(Len(File1)) + " sign"
Debug File1
MakeSureDirectoryPathExists_(@File1)
If OpenFile(1,File1)
WriteString(1,"File1 OK")
CloseFile(1)
EndIf
Debug "END"
Now I have test the BETA lib in PureFileMaster. (No changes on my code. Only zip-Lib replaced)
And it works now fine.
@gnozal
can I use this BETA lib for my next PFM release, or it is better to wait for your
official new Final-Release ? (1.80 ??) What do you recommend ?
I can't say if it is stable in all operations because I tested only the Long-
Filenames.
BTW:
File Attributes still not added in the new BETA.
gnozal wrote:What files attributes ? There are no ZLIB functions to handle file attributes iirc.
Sorry I don't know that it is not possible. I have it tested with TC.
(An ReadOnly file packed and with PFM extracted, and the flag is hold)
If I pack it with pureZip the flag will lost. So are flags readable but not
writeable in archive. Thats is what I mean. It is sad that this is not
supported from ZLib.