| | 1767 | /* -------------------------------------------------------------------- */ |
|---|
| | 1768 | /* If an .ige or .rrd file exists with the same base name, */ |
|---|
| | 1769 | /* delete them. (#1784) */ |
|---|
| | 1770 | /* -------------------------------------------------------------------- */ |
|---|
| | 1771 | CPLString osExtension = CPLGetExtension(pszFilename); |
|---|
| | 1772 | if( !EQUAL(osExtension,"rrd") && !EQUAL(osExtension,"aux") ) |
|---|
| | 1773 | { |
|---|
| | 1774 | CPLString osPath = CPLGetPath( pszFilename ); |
|---|
| | 1775 | CPLString osBasename = CPLGetBasename( pszFilename ); |
|---|
| | 1776 | VSIStatBufL sStatBuf; |
|---|
| | 1777 | CPLString osSupFile = CPLFormCIFilename( osPath, osBasename, "rrd" ); |
|---|
| | 1778 | |
|---|
| | 1779 | if( VSIStatL( osSupFile, &sStatBuf ) == 0 ) |
|---|
| | 1780 | VSIUnlink( osSupFile ); |
|---|
| | 1781 | |
|---|
| | 1782 | osSupFile = CPLFormCIFilename( osPath, osBasename, "ige" ); |
|---|
| | 1783 | |
|---|
| | 1784 | if( VSIStatL( osSupFile, &sStatBuf ) == 0 ) |
|---|
| | 1785 | VSIUnlink( osSupFile ); |
|---|
| | 1786 | } |
|---|
| | 1787 | |
|---|