$OpenBSD: patch-src_PartFileConvert_cpp,v 1.1 2016/06/03 11:54:44 dcoppa Exp $

From f2c05727c232b607be5a3b8b78279a669b1e7ef3 Mon Sep 17 00:00:00 2001
From: upstream svn <svn@amule.org>
Date: Sat, 16 Apr 2016 19:16:44 +0000
Subject: [PATCH] Fix crash when importing partfiles with the
"Preallocate space for new files" preference option enabled

Imported parfiles won't have their space preallocated even if it
is requested in the preferences. The whole importing strategy should
be changed for that, and we'd lose many optimizations meanwhile.
On the other hand, the "create sparse files" preference setting is
taken into account.

--- src/PartFileConvert.cpp.orig	Fri Jun  3 12:15:11 2016
+++ src/PartFileConvert.cpp	Fri Jun  3 12:16:17 2016
@@ -312,7 +312,7 @@ ConvStatus CPartFileConvert::performConvertToeMule(con
 			}
 
 			// create new partmetfile, and remember the new name
-			file->CreatePartFile();
+			file->CreatePartFile(true);
 			newfilename = file->GetFullName();
 
 			Notify_ConvertUpdateProgress(8, _("Creating destination file"));
@@ -383,7 +383,7 @@ ConvStatus CPartFileConvert::performConvertToeMule(con
 			return CONV_OUTOFDISKSPACE;
 		}
 
-		file->CreatePartFile();
+		file->CreatePartFile(true);
 		newfilename = file->GetFullName();
 
 		file->m_hpartfile.Close();
