r18604 by fschmid - ScZipHandler: added function for adding a directory of files to an archive.

scribus-commit scribus-commit at lists.scribus.net
Tue Nov 26 19:32:12 UTC 2013


Author: fschmid
Date: Tue Nov 26 19:32:12 2013
New Revision: 18604

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18604
Log:
ScZipHandler: added function for adding a directory of files to an archive.

Modified:
    trunk/Scribus/scribus/third_party/zip/scribus_zip.cpp
    trunk/Scribus/scribus/third_party/zip/scribus_zip.h
    trunk/Scribus/scribus/third_party/zip/zip.cpp

Modified: trunk/Scribus/scribus/third_party/zip/scribus_zip.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18604&path=/trunk/Scribus/scribus/third_party/zip/scribus_zip.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/zip/scribus_zip.cpp (original)
+++ trunk/Scribus/scribus/third_party/zip/scribus_zip.cpp Tue Nov 26 19:32:12 2013
@@ -98,6 +98,17 @@
 	return retVal;
 }
 
+bool ScZipHandler::write(QString dirName)
+{
+	bool retVal = false;
+	if (m_zi != NULL)
+	{
+		Zip::ErrorCode ec = m_zi->addDirectory(dirName, "", Zip::IgnoreRoot);
+		retVal = (ec == Zip::Ok);
+	}
+	return retVal;
+}
+
 QStringList ScZipHandler::files()
 {
 	QStringList retVal = QStringList();

Modified: trunk/Scribus/scribus/third_party/zip/scribus_zip.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18604&path=/trunk/Scribus/scribus/third_party/zip/scribus_zip.h
==============================================================================
--- trunk/Scribus/scribus/third_party/zip/scribus_zip.h (original)
+++ trunk/Scribus/scribus/third_party/zip/scribus_zip.h Tue Nov 26 19:32:12 2013
@@ -34,6 +34,7 @@
 		bool close();
 		bool contains(QString fileName);
 		bool read(QString fileName, QByteArray &buf);
+		bool write(QString dirName);
 		QStringList files();
 	private:
 		UnZip* m_uz;

Modified: trunk/Scribus/scribus/third_party/zip/zip.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18604&path=/trunk/Scribus/scribus/third_party/zip/zip.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/zip/zip.cpp (original)
+++ trunk/Scribus/scribus/third_party/zip/zip.cpp Tue Nov 26 19:32:12 2013
@@ -398,6 +398,7 @@
 
     const QDir::Filters dir_filter =
             QDir::Files |
+			QDir::Hidden |
             QDir::Dirs |
             QDir::NoDotAndDotDot |
             QDir::NoSymLinks;




More information about the scribus-commit mailing list