about summary refs log tree commit diff
path: root/src/engine/shared
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-10-16 18:33:54 +0200
committeroy <Tom_Adams@web.de>2010-10-16 18:33:54 +0200
commit85fd27284621d335dd76ee66da7349b19004adc1 (patch)
tree82d377b016cb5dae093b76bb16a9eacf82f1fd05 /src/engine/shared
parent662f43919cfb1cd449a75516a87ad2e9623636b1 (diff)
downloadzcatch-85fd27284621d335dd76ee66da7349b19004adc1.tar.gz
zcatch-85fd27284621d335dd76ee66da7349b19004adc1.zip
added the possibility to create a new folder within the editor's save file dialog
Diffstat (limited to 'src/engine/shared')
-rw-r--r--src/engine/shared/storage.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/engine/shared/storage.cpp b/src/engine/shared/storage.cpp
index cfe64e4b..46127700 100644
--- a/src/engine/shared/storage.cpp
+++ b/src/engine/shared/storage.cpp
@@ -300,6 +300,15 @@ public:
 		return remove(GetPath(Type, pFilename, aBuffer, sizeof(aBuffer)));
 	}
 
+	virtual bool CreateFolder(const char *pFoldername, int Type)
+	{
+		if(Type < 0 || Type >= m_NumPaths)
+			return false;
+
+		char aBuffer[MAX_PATH_LENGTH];
+		return fs_makedir(GetPath(Type, pFoldername, aBuffer, sizeof(aBuffer)));
+	}
+
 	static IStorage *Create(const char *pApplicationName, int NumArgs, const char **ppArguments)
 	{
 		CStorage *p = new CStorage();