Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368811 - Keep extension of original file when create temporary file in method org.eclipse.jgit.dircache.DirCacheCheckout#checkoutEntry
Summary: Keep extension of original file when create temporary file in method org.ecli...
Status: CLOSED WONTFIX
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-17 06:10 EST by Andrey Parfonov CLA
Modified: 2015-11-27 18:14 EST (History)
2 users (show)

See Also:


Attachments
The patch for requested improvement. (1.45 KB, patch)
2012-01-17 06:12 EST, Andrey Parfonov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Parfonov CLA 2012-01-17 06:10:28 EST
Build Identifier: 

We use JGit in online IDE. It is important for us to know the type of file. Type of file is determined from file extension when file is created (but not moved or copied). We track the creation of each file and keep some metadata e.g. media type of file.
Temporary file created without extension (method DirCacheCheckout#checkoutEntry) so the media type cannot be determined. When this file replace original file the media type of original file is lost.
It will be very helpful to keep extension of original file for temporary file. I guess it is very easy to do, see the attached patch. 

Reproducible: Always
Comment 1 Andrey Parfonov CLA 2012-01-17 06:12:39 EST
Created attachment 209610 [details]
The patch for requested improvement.
Comment 2 Matthias Sohn CLA 2015-11-27 18:14:02 EST
the temporary file is existing for a very short period of time only