Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Windows filesystem sync issues?

Windows filesystem sync issues?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 534 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ribtoks
    wrote on last edited by ribtoks
    #1

    I've run into interesting problems using Exiftool 10.10+, Qt 5.5.1 and Windows 10.

    I'm creating temporary file with QTemporaryFile, write there some data, save it, wait untill it's flushed using FlushFileBuffers() and afterwards pass this file as arguments file for exiftool. Data which I'm writing there is UTF-8 encoded paths to images:

    QTemporaryFile argumentsFile;
    
    if (argumentsFile.open()) {
        QStringList exiftoolArguments = createArgumentsList();
        foreach (const QString &line, exiftoolArguments) {
            argumentsFile.write(line.toUtf8());
            argumentsFile.write("\r\n");
        }
    }
    
    argumentsFile.flush()
    
    // fsync stuff here...
    
    argumentsFile.close()
    
    // starting exiftool with -@ argumentsFile.fileName() parameter here 
    // also with -charset filename=UTF8
    

    So the problem is the following: when filenames does not contain Unicode symbols, Exiftool reads images, imports Exif metadata and everything is fine.

    But when filenames contain Unicode symbols, sometimes Exiftool does not catch up them, unless I will insert QThread::sleep(msec) call which will make current thread to switch context and possible give ability to sync buffers for other threads (writing to harddrive).

    Exiftool run from cmd line with same file always reads metadata, unless started with QProcess with the way explained before. What can be the issue?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved