<p dir="ltr">Hi Thomas,</p>
<p dir="ltr">GIS stores project files and data files separately.<br>
Did you create a temporary layer or a permanent one?<br>
You can also change in Project settings type of stored Path (absolute/relative) inside project file.</p>
<div data-smartmail="gmail_signature">--<br>- poslano s mobitela -<br>Srdačan pozdrav,<br>Vedran Stojnović.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 27, 2024, 17:52 Thomas Larsen Wessel via QGIS-Developer <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I created an empty qgis project, then chose New GeoPackage Layer, chose a new file "foo.gpkg" and layername "mytable". <div><br></div><div>Everything seems fine. But if I save, and reopen the project it cant find the source. So I inspect the qgz XML and find the source for the layer in two places:</div><div><br></div><div>### Layer-Tree-Layer: </div><div><br></div><div><layer-tree-layer <br> id="mytable_d645cad7_6637_434d_9295_dc62a7ff198e" <br> source="./foo.gpkg|layername=mytable" <br> legend_split_behavior="0" <br> name="mytable" expanded="1" <br> checked="Qt::Checked" <br> providerKey="ogr" <br> legend_exp="" <br> patch_size="-1,-1"<br>><br></div><div><br></div><div>### MapLayer</div><div><br></div><div><projectlayers><br> <maplayer (...) ><br> <id>mytable_d645cad7_6637_434d_9295_dc62a7ff198e</id><br> <datasource>../../OneDrive/Dokumenter/foo.gpkg|layername=mytable</datasource><br> (...)<br> <layername>foo — mytable</layername><br> (...)<br> </maplayer><br></projectlayers><br></div><div><br></div><div><br></div><div>The latter for some reason has a wrong value in datasource. I have no projects or data files in that location, so I guess QGIS somehow defaulted to my users document folder. This seems like some kind of bug. </div><div><br></div><div>But I wonder, why, in the first place, is datasource in two different places in that file?</div><div><br></div><div>Running QGIS 3.36.3 on Windows 10. </div><div><br></div><div>Sincerely, Thomas</div><div><br></div><div><br></div></div>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank" rel="noreferrer">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>