In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
TZIPFile Possible Bug
TZIPFile Possible Bug
Hello Xailers,
I think there is an error when compacting files with tzipfile class... The problem is that it does not include the path when compacting, it just adds all files in one folder, ignoring the property.
The property lRecurse is not working too.
Is this a bug?
TIA,
Juliano
Attached files TZipFile.zip (7 KB)Â
I think there is an error when compacting files with tzipfile class... The problem is that it does not include the path when compacting, it just adds all files in one folder, ignoring the property.
The property lRecurse is not working too.
Is this a bug?
TIA,
Juliano
Attached files TZipFile.zip (7 KB)Â
- ignacio
- Site Admin
- Mensajes: 9445
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
TZIPFile Possible Bug
Dear Sir,
Export a project within Xailer and you will see that the paths are saved correctly. The IDE uses exactly the same class with no modifications.
BTW, the sample TestZip from SamplesZipArchive directory works also as expected.
Regards,
Export a project within Xailer and you will see that the paths are saved correctly. The IDE uses exactly the same class with no modifications.
BTW, the sample TestZip from SamplesZipArchive directory works also as expected.
Regards,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
TZIPFile Possible Bug
Hello Ignacio,
Thanks for the help. But the error happens when I add some diferent mask to the filter.
eg.: in the sample, change the line 114 to cSrcFile := ::oEdit1:cText + "*.xfm", it will not scan the folders for xfm files and will give you an error.
TIA,
Juliano
Thanks for the help. But the error happens when I add some diferent mask to the filter.
eg.: in the sample, change the line 114 to cSrcFile := ::oEdit1:cText + "*.xfm", it will not scan the folders for xfm files and will give you an error.
TIA,
Juliano
- ignacio
- Site Admin
- Mensajes: 9445
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
TZIPFile Possible Bug
Hello,
Problem solved. This is the corrected code on module ZipArchive.prg:
STATIC FUNCTION RecurseDir( cMask, lRecursive, aFiles )
LOCAL aDir, aFile
LOCAL cPath, cFile
DEFAULT aFiles TO {}, lRecursive TO .F.
aDir := Directory( cMask )
cPath := FilePath( cMask )
cMask := FileFullname( cMask )
FOR EACH aFile IN aDir
cFile := aFile[ F_NAME ]
AAdd( aFiles, cPath + "" + cFile )
NEXT
IF lRecursive
aDir := Directory( cPath + "*.*", "D" )
FOR EACH aFile IN aDir
cFile := aFile[ F_NAME ]
IF "D" $ aFile[ F_ATTR ] .AND. cFile != "." .AND. cFile != ".."
RecurseDir( cPath + "" + cFile + "" + cMask, .T., @aFiles )
ENDIF
NEXT
ENDIF
RETURN aFiles
BTW, we plan to update Xailer 3 to 3.1 tomorrow. In case you can wait.
Regards,
Problem solved. This is the corrected code on module ZipArchive.prg:
STATIC FUNCTION RecurseDir( cMask, lRecursive, aFiles )
LOCAL aDir, aFile
LOCAL cPath, cFile
DEFAULT aFiles TO {}, lRecursive TO .F.
aDir := Directory( cMask )
cPath := FilePath( cMask )
cMask := FileFullname( cMask )
FOR EACH aFile IN aDir
cFile := aFile[ F_NAME ]
AAdd( aFiles, cPath + "" + cFile )
NEXT
IF lRecursive
aDir := Directory( cPath + "*.*", "D" )
FOR EACH aFile IN aDir
cFile := aFile[ F_NAME ]
IF "D" $ aFile[ F_ATTR ] .AND. cFile != "." .AND. cFile != ".."
RecurseDir( cPath + "" + cFile + "" + cMask, .T., @aFiles )
ENDIF
NEXT
ENDIF
RETURN aFiles
BTW, we plan to update Xailer 3 to 3.1 tomorrow. In case you can wait.
Regards,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
TZIPFile Possible Bug
Thanks Ignacio! We will wait for the version tomorrow!
Regards,
Juliano
Regards,
Juliano
- ignacio
- Site Admin
- Mensajes: 9445
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
TZIPFile Possible Bug
emeasoft escribió el mié, 17 abril 2013 18:34Thanks Ignacio! We will wait for the version tomorrow!
Regards,
Juliano
Should have said 3.0.2
Regards,
Regards,
Juliano
Should have said 3.0.2
Regards,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
TZIPFile Possible Bug
Hello Ignacio,
Upon some more testing, I found one more error...
The property lIncludePath is not fully working, it is not including the full file path.
eg.: I want to compact all the xfm files in my project 1 folder and all the xfm from my project folder 2.
1- all xfm from C:Project1*.xfm
2- all xfm from C:Project2*.xfm
The final zip dir structure is like this sourcexfm_from_all_projects (ZipExample1) instead of a structure like Project1sources...xfm and Project2sources...xfm(ZipExample2)
TIA,
Juliano
Attached files ZipExample1.zip (817 B)Â ZipExample2.zip (1.4 KB)Â
Upon some more testing, I found one more error...
The property lIncludePath is not fully working, it is not including the full file path.
eg.: I want to compact all the xfm files in my project 1 folder and all the xfm from my project folder 2.
1- all xfm from C:Project1*.xfm
2- all xfm from C:Project2*.xfm
The final zip dir structure is like this sourcexfm_from_all_projects (ZipExample1) instead of a structure like Project1sources...xfm and Project2sources...xfm(ZipExample2)
TIA,
Juliano
Attached files ZipExample1.zip (817 B)Â ZipExample2.zip (1.4 KB)Â
- ignacio
- Site Admin
- Mensajes: 9445
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
TZIPFile Possible Bug
emeasoft escribió el jue, 18 abril 2013 14:10Hello Ignacio,
Upon some more testing, I found one more error...
The property lIncludePath is not fully working, it is not including the full file path.
eg.: I want to compact all the xfm files in my project 1 folder and all the xfm from my project folder 2.
1- all xfm from C:Project1*.xfm
2- all xfm from C:Project2*.xfm
The final zip dir structure is like this sourcexfm_from_all_projects (ZipExample1) instead of a structure like Project1sources...xfm and Project2sources...xfm(ZipExample2)
TIA,
Juliano
Hello,
On those cases you must use the property lIncludeDrive to .T.
Regards,
Upon some more testing, I found one more error...
The property lIncludePath is not fully working, it is not including the full file path.
eg.: I want to compact all the xfm files in my project 1 folder and all the xfm from my project folder 2.
1- all xfm from C:Project1*.xfm
2- all xfm from C:Project2*.xfm
The final zip dir structure is like this sourcexfm_from_all_projects (ZipExample1) instead of a structure like Project1sources...xfm and Project2sources...xfm(ZipExample2)
TIA,
Juliano
Hello,
On those cases you must use the property lIncludeDrive to .T.
Regards,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
TZIPFile Possible Bug
Hello Ignacio,
Using includeDrive will add the drive to the zip, but we do not want this... To correct the problem I just changed the line 135 cFile := SubStr( cFile, Len( cPath ) + 2 ) to cFile := SubStr( cFile, 3 ).
The problem is that when you want to compact a folder, it compacts the content of the folder only.
eg.: Right mouse click on a folder on your desktop > send to > zip folder, this is how it should work...
TIA,
Juliano
Using includeDrive will add the drive to the zip, but we do not want this... To correct the problem I just changed the line 135 cFile := SubStr( cFile, Len( cPath ) + 2 ) to cFile := SubStr( cFile, 3 ).
The problem is that when you want to compact a folder, it compacts the content of the folder only.
eg.: Right mouse click on a folder on your desktop > send to > zip folder, this is how it should work...
TIA,
Juliano
- ignacio
- Site Admin
- Mensajes: 9445
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
TZIPFile Possible Bug
emeasoft escribió el lun, 22 abril 2013 13:59Hello Ignacio,
Using includeDrive will add the drive to the zip, but we do not want this... To correct the problem I just changed the line 135 cFile := SubStr( cFile, Len( cPath ) + 2 ) to cFile := SubStr( cFile, 3 ).
The problem is that when you want to compact a folder, it compacts the content of the folder only.
eg.: Right mouse click on a folder on your desktop > send to > zip folder, this is how it should work...
TIA,
Juliano
If that fixes your requirements go ahead y believe it does not the job correctly but maybe I'm wrong, for example:
Mask 1) c:tempproject1*.*
Mask 2) c:tempproject2*.*
Which is the root path?
temp
Now this one:
Mask 1) c:tempproject1*.*
Mask 2) c:temp2project2*.*
Which is the root path?
????
Regards,
Using includeDrive will add the drive to the zip, but we do not want this... To correct the problem I just changed the line 135 cFile := SubStr( cFile, Len( cPath ) + 2 ) to cFile := SubStr( cFile, 3 ).
The problem is that when you want to compact a folder, it compacts the content of the folder only.
eg.: Right mouse click on a folder on your desktop > send to > zip folder, this is how it should work...
TIA,
Juliano
If that fixes your requirements go ahead y believe it does not the job correctly but maybe I'm wrong, for example:
Mask 1) c:tempproject1*.*
Mask 2) c:tempproject2*.*
Which is the root path?
temp
Now this one:
Mask 1) c:tempproject1*.*
Mask 2) c:temp2project2*.*
Which is the root path?
????
Regards,
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com