qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.09k stars 2.93k forks source link

QGis silently overwrite file specified without extension. #53906

Open FernandoRoxo opened 12 months ago

FernandoRoxo commented 12 months ago

What is the bug or the crash?

Possible bug:

Today I was exporting some QGis projects as PNG images (project>import/export>export map to image). At certain point I made
a mistake and repeated the name of the previous map, and QGis happily overwrote the previous image, without asking before. I tried to repeat the action giving the full name of the file (map10.png) and QGis asked for confirmation. The difference was that the first time I gave jjust a name, without the "extension" .png.

It seems that even if QGis will give the default "extension" to the filename, it does not verify the prior existence of the file after it attach the "extension".

This was in a QGis 3.26.0 on Linux Xubuntu 20.04. I know that both the QGis and system are kind of old, but if this "feature" is present in current versions it can be cumbersome. ===========================8<------------------------------- At QGis user list it was mentioned that this can be a problem with Linux libraries.

Steps to reproduce the issue

Just save a file with a name without the default extension, like described above.

Repeat the process using the same name with and without extension.

Versions

At the user list it was confirmed in recent versions.

Versão do QGIS 3.26.0-Buenos Aires Código da versão do QGIS 0aece2818e
Versão Qt 5.12.8
Versão do Python 3.8.10
GDAL/OGR version 3.0.4
PROJ version 6.3.1
EPSG Registry database version v9.8.6 (2020-01-22)
Compilado sobre GEOS 3.8.0-CAPI-1.13.1 Rodando sobre GEOS 3.8.0-CAPI-1.13.1
Compilado no SQLite 3.31.1 Executando contra SQLite 3.41.2
Versão PDAL 2.0.1
PostgreSQL client version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1)
SpatiaLite version 4.3.0a
Versão QWT 6.1.4
Versão QScintilla2 2.11.2
OS version Ubuntu 20.04.6 LTS
       

Active Python plugins lftools | 1.11.0 terrabrasilis_datasource | 0.2 qgeric | 1.91 ImportPhotos | 3.0.5 qgis-maptiler-plugin | 3.2 mmqgis | 2021.9.10 qgis-plugin-findreplace-main | 1 valuetool | 3.0.15 ibgedatadownloader | 0.1.0 SLD4raster | 1.0 dados_censo | 0.40 VectorBender | 0.2.1 latlontools | 3.6.11 quick_map_services | 0.19.33 HCMGIS | 23.7.19 seismic_importer | 0.3 qNote | 2.2 QuickWKT | 3.1 GpxSegmentImporter | 2.5 Qgis2threejs | 2.7.1 qgis_resource_sharing | 1.0.0 slyr_community | 5.0.0 inde | 1.1 MemoryLayerSaver | 5.0.1 ana_data_acquisition | 1.0 QGIS3-getWKT | 1.5 toggleactivelayer_plugin | 1.3 DigitizingTools | 1.5.2 DsgTools | 4.8.0 pluginbuilder3 | 3.2.1 qgis2web | 3.16.0 LoadQSS | 1.4.2 IPyConsole | version 2.0 pointsamplingtool | 0.5.4 QuickOSM | 2.2.2 AzimuthMeasurement | 0.2.2 shapetools | 3.4.14 SpreadsheetLayers | 2.1.0 hidroweb_downloader | 1.1.0 scriptrunner3 | 3.0.5 QuickMultiAttributeEdit3 | version 3.0.3 processing_r | 3.1.1 kmltools | 3.1.29 grassprovider | 2.12.99 otbprovider | 2.12.99 sagaprovider | 2.12.99 MetaSearch | 0.3.6 db_manager | 0.1.20 processing | 2.12.99

Versão do QGIS 3.26.0-Buenos Aires Código da versão do QGIS 0aece2818e Versão Qt 5.12.8 Versão do Python 3.8.10 GDAL/OGR version 3.0.4 PROJ version 6.3.1 EPSG Registry database version v9.8.6 (2020-01-22) Compilado sobre GEOS 3.8.0-CAPI-1.13.1 Rodando sobre GEOS 3.8.0-CAPI-1.13.1 Compilado no SQLite 3.31.1 Executando contra SQLite 3.41.2 Versão PDAL 2.0.1 PostgreSQL client version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) SpatiaLite version 4.3.0a Versão QWT 6.1.4 Versão QScintilla2 2.11.2 OS version Ubuntu 20.04.6 LTS

Active Python plugins lftools 1.11.0 terrabrasilis_datasource 0.2 qgeric 1.91 ImportPhotos 3.0.5 qgis-maptiler-plugin 3.2 mmqgis 2021.9.10 qgis-plugin-findreplace-main 1 valuetool 3.0.15 ibgedatadownloader 0.1.0 SLD4raster 1.0 dados_censo 0.40 VectorBender 0.2.1 latlontools 3.6.11 quick_map_services 0.19.33 HCMGIS 23.7.19 seismic_importer 0.3 qNote 2.2 QuickWKT 3.1 GpxSegmentImporter 2.5 Qgis2threejs 2.7.1 qgis_resource_sharing 1.0.0 slyr_community 5.0.0 inde 1.1 MemoryLayerSaver 5.0.1 ana_data_acquisition 1.0 QGIS3-getWKT 1.5 toggleactivelayer_plugin 1.3 DigitizingTools 1.5.2 DsgTools 4.8.0 pluginbuilder3 3.2.1 qgis2web 3.16.0 LoadQSS 1.4.2 IPyConsole version 2.0 pointsamplingtool 0.5.4 QuickOSM 2.2.2 AzimuthMeasurement 0.2.2 shapetools 3.4.14 SpreadsheetLayers 2.1.0 hidroweb_downloader 1.1.0 scriptrunner3 3.0.5 QuickMultiAttributeEdit3 version 3.0.3 processing_r 3.1.1 kmltools 3.1.29 grassprovider 2.12.99 otbprovider 2.12.99 sagaprovider 2.12.99 MetaSearch 0.3.6 db_manager 0.1.20 processing 2.12.99

Supported QGIS version

New profile

Additional context

No response

agiudiceandrea commented 12 months ago

https://lists.osgeo.org/pipermail/qgis-user/2023-July/053230.html