This commit is contained in:
@@ -287,15 +287,17 @@ namespace DataLoader
|
||||
int nBytesRead = fs.Read(ByteArray, 0, (int)len);
|
||||
fs.Close();
|
||||
string t1 = (title == null || title == "") ? null : title;
|
||||
Document doc = Document.MakeDocument(t1, ByteArray, null, ci == null ? null : ci.ToString(), dtsutc, "Migration", ".Doc");
|
||||
FileInfo tmpFile = new FileInfo(temppath);
|
||||
string docfile = temppath.Substring(0, temppath.LastIndexOf(".")) + @".doc";
|
||||
if (File.Exists(docfile)) File.Delete(docfile);
|
||||
FileInfo doctmpFile = tmpFile.CopyTo(docfile);
|
||||
doc.DocAscii = ascii;
|
||||
doc.Save();
|
||||
File.Delete(docfile);
|
||||
return doc.DocID;
|
||||
using (Document doc = Document.MakeDocument(t1, ByteArray, null, ci == null ? null : ci.ToString(), dtsutc, "Migration", ".Doc"))
|
||||
{
|
||||
FileInfo tmpFile = new FileInfo(temppath);
|
||||
string docfile = temppath.Substring(0, temppath.LastIndexOf(".")) + @".doc";
|
||||
if (File.Exists(docfile)) File.Delete(docfile);
|
||||
FileInfo doctmpFile = tmpFile.CopyTo(docfile);
|
||||
doc.DocAscii = ascii;
|
||||
doc.Save();
|
||||
File.Delete(docfile);
|
||||
return doc.DocID;
|
||||
}
|
||||
}
|
||||
// for an io exception, keep trying
|
||||
catch (IOException exio)
|
||||
|
Reference in New Issue
Block a user