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