<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Jonathan -</p>
    <p>Thanks for the "heads-up" regarding wal files. The technical
      problem is using the xFAT file system  - when xFAT gets corrupted,
      it will partly be write-protected. This will inhibit QGIS in
      making the 2 wal files (or updating or deleting them). <br>
    </p>
    <p>But QGIS has an issue here: When the situation occurs, QGIS will
      quietly tell you about in the relatively obscure log system. And
      it will show you an <b>empty</b> GeoPackage - no layers. That is
      not smart. It will upset users (It certainly did upset me :-) .
      They will believe, that their precious layers in the GeoPackage
      has disappeared. However, the layers is perfectly alright. If you
      copy the GeoPackage to another filesystem, QGIS will happily open
      the layers from the copy. <br>
    </p>
    <p>IMHO, a better approach would to have a big fat error message
      informing users that they have a problem with the underlying file
      system. (I plan to write a feature request about this later today)
      <br>
    </p>
    <div class="moz-cite-prefix">
      <p> <br>
      </p>
      --
      <pre class="moz-signature" cols="72">Med venlig hilsen / Kind regards

Bo Victor Thomsen
</pre>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Den 18-05-2020 kl. 17:49 skrev Jonathan
      Moules:<br>
    </div>
    <blockquote type="cite"
      cite="mid:34908334-89b9-ab21-c6b4-2be63394db3a@lightpear.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Hi Bo,</p>
      <p>Looking at the WAL docs for SQLite (<a
          class="moz-txt-link-freetext"
          href="https://www.sqlite.org/wal.html" moz-do-not-send="true">https://www.sqlite.org/wal.html</a>)
        (what geopackage is built from) I see this:</p>
      <p>"The WAL file exists for as long as any database connection has
        the database open. Usually, the WAL file is deleted
        automatically when the last connection to the database closes.
        However, if the last process to have the database open exits
        without cleanly shutting down the database connection, or if the
        SQLITE_FCNTL_PERSIST_WAL file control is used, then the WAL file
        might be retained on disk after all connections to the database
        have been closed."</p>
      <p>So it sounds like whatever the last process is to touch the
        GeoPackage may not be closing the connection cleanly on exFat.</p>
      <p>Cheers,</p>
      <p>Jonathan<br>
      </p>
      <div class="moz-cite-prefix">On 2020-05-11 13:10, Bo Victor
        Thomsen wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:dff03255-2f20-d875-5474-15485b099714@gmail.com">
        <p>Hi all -</p>
        <p>I have a strange problem. I'm have 3 different disk on my
          windows based system on Mac hardware<br>
        </p>
        <ol>
          <li>My system drive. Formatted to NTFS.</li>
          <li>A flash-drive. Formatted to FAT32.</li>
          <li>A data drive. Formatted to exFAT. The last is my primary
            data drive and is shared between my Windows partition and my
            Mac partition on my MacBook Pro. Hence the use of exFAT.<br>
          </li>
        </ol>
        <p>I have a QGIS plugin, which copies a template of a GeoPackage
          file to "where-ever the user wants it placed" and afterward
          make some content changes in the copy using the PyQT QSQL
          module with the QSPATIALITE driver<br>
        </p>
        <p>This work if the Geopackage  file is copied to either disk no
          1 (NTFS) or disk no 2 (FAT32). However, it doesn't work if the
          file is copied to disk no 3 (exFAT). The process leaves the
          WAL files even after the database is closed properly. <br>
        </p>
        <p>And even more strange: If I reformat the flash-drive to exFAT
          and repeat the experiment using the reformatted drive it too
          works without a hitch.</p>
        <p>The normal "divide et impera" method tells me that my exFat
          data disk is bork'ed. However this error <b>only</b> occurs
          with the QGIS/GeoPackage creation/modification scenario.
          Everything else is working OK.<br>
        </p>
        <p>The disk is not shared on the network. Has anyone experienced
          the same type of problems ? And have a solution ?? Just asking
          before I begin to clean up / reformat my 100 GB data disk <br>
        </p>
        <p>System setup: MacBook Pro 2014 / Windows 8.1 OS /QGIS 3.10.5
          (the same problem occurs with 3.10.0 , 3.10.2 ...3.12.2) <br>
        </p>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org" moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
      </blockquote>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Med venlig hilsen / Kind regards

Bo Victor Thomsen
</pre>
  </body>
</html>