Page 17 of 40
Posted: Tue Jun 12, 2007 1:47 pm
by String
I always get the same result
My system: German
Windows XP
PureBasic v4.02
PureZIP beta of this (April 16th, 2007) (download above)
Test code: of gnozal
My result:
Code: Select all
C:\TEMP\111111111111111\222222222222222\33333333333333333\444444444444444\555555555555\666666666\777777777777777777\TEMP\111111111111111\222222222222222\33333333333333333\444444444444444\555555555555\666666666\ 777
The PureFileMaster of al90 German forum cannot work with long path names, either.
http://www.purebasic.fr/german/viewtopi ... filemaster
Posted: Tue Jun 12, 2007 2:29 pm
by gnozal
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.
Posted: Tue Jun 12, 2007 3:19 pm
by Tranquil
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.
Posted: Tue Jun 12, 2007 4:11 pm
by gnozal
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 ?!
Posted: Tue Jun 12, 2007 4:53 pm
by Tranquil
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)
Code: Select all
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.
Posted: Tue Jun 12, 2007 7:43 pm
by blueznl
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.
Posted: Tue Jun 12, 2007 7:51 pm
by ts-soft
> MakeSureDirectoryPathExists_()
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)
Posted: Wed Jun 13, 2007 8:24 am
by gnozal
ts-soft wrote:> MakeSureDirectoryPathExists_()
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)
The older Win32.hlp says it comes with IMAGEHLP.DLL ... Anyway, I found it so far on any system I checked.
string wrote:I always get the same result
Did you try to create a long path (> 200) with MakeSureDirectoryPathExists_() on your system (just to be sure this is the issue) ?
Posted: Wed Jun 13, 2007 5:42 pm
by String
Hello gnozal
I use NTFS
MakeSureDirectoryPathExists
work well
I have looked For help in the German forum.
http://www.purebasic.fr/german/viewtopi ... &start=140
Code: Select all
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"
Posted: Wed Jun 13, 2007 9:20 pm
by AL90
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.
Posted: Thu Jun 14, 2007 11:20 pm
by String
Hello gnozal
Sorry
The beta is OK!
Something always went wrongly at the download.
Sorry

Posted: Fri Jun 15, 2007 9:50 am
by gnozal
If the beta lib is ok, I will update all the libraries.
No problem using the beta. The final will have the same code.
Posted: Fri Jun 15, 2007 10:43 am
by gnozal
Update (both libs)
Changes :
- fixed a problem with very long path names
Posted: Fri Jun 15, 2007 10:54 am
by gnozal
AL90 wrote:BTW:
File Attributes still not added in the new BETA.
What files attributes ? There are no ZLIB functions to handle file attributes iirc.
Posted: Fri Jun 15, 2007 7:09 pm
by AL90
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.
Thanks for Help.