Welcome to the Xceed Community | Help
Community Search  
More Search Options

Generated temporary filename was not unique - Please

Sort Posts: Previous Next
  •  10-01-2008, 6:32 PM Post no. 15797

    Generated temporary filename was not unique - Please

    I try to create a new ZIP using function CreateFile but; I recive this message:

     Generated temporary filename was not unique.

    Type: Xceed.FileSystem.DiskFile

    FullName: C:\Documents and Settings\MARTHAXP\ASPNET\LOCALS~1\Temp\b0bca9ce-998b-422a-9c86-5288ef2934f8.tmp

     Please if everyone say something help me.

    Filed under:
  •  10-02-2008, 1:21 PM Post no. 15844 in reply to 15797

    Re: Generated temporary filename was not unique - Please

    Can you provide a code snippet of what you are doing exactly?
    André
    Software Developer
    Xceed Software Inc.
  •  10-09-2008, 9:10 AM Post no. 15987 in reply to 15844

    Re: Generated temporary filename was not unique - Please

    Hi im also getting this error

     Generated temporary filename was not unique. Type: Xceed.FileSystem.DiskFile FullName: C:\Documents and Settings\dpickering\Local Settings\Temp\aa74e1bd-1304-46c1-afcc-f0f94259fa8f.tmp

    im using the following function to zip multiple files:

     
        Private Function ZipFiles(ByVal zipFilename As String, ByVal sourceFilenames As String()) As Integer

            Dim zipArchive As ZipArchive = Nothing
            Dim errorCount As Integer = 0

            Try
                ' allocate the destination file and create an archive from it
                Dim zipFile As DiskFile = New DiskFile(zipFilename)
                Dim zipFolder As ZippedFolder
                zipArchive = New ZipArchive(zipFile)

                ' configure zip archive
                zipArchive.BeginUpdate(zipArchiveEvents, Nothing)
                ' moderate compression level
                zipArchive.DefaultCompressionLevel = Xceed.Compression.CompressionLevel.Normal
                zipArchive.DefaultCompressionMethod = Xceed.Compression.CompressionMethod.Deflated
                ' no encryption (though imo there should be tbh)
                zipArchive.DefaultEncryptionPassword = String.Empty
                ' multi-part zip files are confirmed as not required
                zipArchive.AllowSpanning = False

                ' process each file individually
                Dim sourceFilename As String = String.Empty
                Dim processedFileCount As Integer = 0

                ' iterate through specified filenames
                For Each sourceFilename In sourceFilenames

                    Try
                        ' check file location (root special handling)
                        Dim sourceFile As DiskFile = New DiskFile(sourceFilename)
                        Dim rootName As String = System.IO.Path.GetPathRoot(sourceFilename)
                        Dim pathName As String = System.IO.Path.GetDirectoryName(sourceFilename)

                        ' strip off path root (i.e. 'c:\')
                        pathName = pathName.Substring(rootName.Length, pathName.Length - rootName.Length)

                        ' If pathName and rootName are the same, the destination is the root of the
                        ' zip file so use "\" instead of string.empty
                        If pathName = String.Empty Then
                            pathName = "\"
                        End If

                        ' copy source file to destination zip 'folder'
                        zipFolder = CType(zipArchive.GetFolder(pathName), ZippedFolder)
                        sourceFile.CopyTo(zipArchiveEvents, Nothing, zipFolder, True)
                    Catch ex As Exception
                        errorCount = errorCount + 1
                        EmitBackupError(ex.Message, zipFilename)
                    Finally
                        ' update status bar
                        Dim percentageComplete As Integer = CInt((processedFileCount / sourceFilenames.Length) * 100)
                        CType(MdiParent, fMain).sbMain.Panels("Progress").Visible = True
                        CType(MdiParent, fMain).sbMain.Panels("Progress").ProgressBarInfo.Value = percentageComplete

                        ' no need to pump win32 message queue here as zipArchiveEvents_ByteProgression does it for us
                        'Application.DoEvents()

                        ' increment file counter (for status bar update)
                        processedFileCount = processedFileCount + 1
                    End Try
                Next

                'delete output if errors occur to eliminate user confusion
                If errorCount > 0 Then
                    If File.Exists(zipFilename) Then File.Delete(zipFilename)
                End If
            Catch ex As Exception
                EmitBackupError(ex.Message, zipFilename)
            Finally
                If Not zipArchive Is Nothing Then
                    zipArchive.EndUpdate(zipArchiveEvents, Nothing)
                End If

                CType(MdiParent, fMain).sbMain.Panels("Progress").Visible = False
            End Try

            Return errorCount

        End Function

  •  10-10-2008, 10:58 AM Post no. 16018 in reply to 15987

    Re: Generated temporary filename was not unique - Please

    Are you using the latest version (3.7)?  We had a bug before version 3.6 which is now corrected :

    A check is now made to ensure that a temp file has a unique name before it is created. 

     


    André
    Software Developer
    Xceed Software Inc.
  •  04-09-2012, 4:43 AM Post no. 31961 in reply to 16018

    Re: Generated temporary filename was not unique - Please

    Hello, we have a similar error trying to create a zip file using Xceed Copy method ... I have check our DLL version and It is 4.1.9460.14460 v (Xceed.Zip.dll / Xceed.FileSystem.dll)

    here is our stack error

    This is the exception stack trace registered on the system:

    Xceed.FileSystem.FileSystemInternalException: Generated temporary filename was not unique.

    Type: Xceed.FileSystem.DiskFile

    FullName: c:\Temp\2016464f-f384-431c-ab41-0d756e001f6e.tmp ---> Xceed.FileSystem.FileSystemException: The physical file represented by the item could not be created.

    Type: Xceed.FileSystem.DiskFile

    FullName: c:\Temp\2016464f-f384-431c-ab41-0d756e001f6e.tmp ---> System.IO.IOException: Data error (cyclic redundancy check).

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)

    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)

    at System.IO.FileInfo.Create()

    at Xceed.FileSystem.DiskFile.DoCreate(FileSystemEventsSession session)

    --- End of inner exception stack trace ---

    at Xceed.FileSystem.FileSystemItem.Create(FileSystemEvents events, Object userData)

    at Xceed.FileSystem.FileSystemItem.Create()

    at Xceed.FileSystem.AbstractFolder.CreateTempFile()

    --- End of inner exception stack trace ---

    at Xceed.FileSystem.FileSystemItem.CopyTo(FileSystemEvents events, Object userData, AbstractFolder destinationFolder, Boolean replaceExistingFiles)

    at Xceed.FileSystem.FileSystemItem.CopyTo(AbstractFolder destinationFolder, Boolean replaceExistingFiles)

    at XXX.TestCasesDevelopmentKit.Results.ResultsManager.BuildResultFile(String source, String target, String password)

    at XXX.TestCasesDevelopmentKit.Results.ResultsManager.SaveResults()

    at XXX.TestCasesDevelopmentKit.Results.ResultsManager.Close()

    Filed under:
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.