DBRepair development

@lordmage

What can you tell me about where the Plex directories are ?

I use APPDATA/LOCAL then APPDATA/ROAMING.

Can you help me identify what I’m missing here?
( I tested on Win 11 Pro, PMS installed on C:, Run from C: )

// Windows host
  } else if (H.UserInfo.Os == 2) {

    // Determine if local or roaming
    H.AppSuppDir[0]='\0';
    setString(TestDir, "%s/%s", H.UserInfo.HomeDir,"/AppData/Local/Plex Media Server");
    if (isDir(TestDir)) {
      setString(H.AppSuppDir,"%s/%s",H.UserInfo.HomeDir,"/AppData/Local");
    } else {
      setString(TestDir,"%s/%s",H.UserInfo.HomeDir,"/AppData/Roaming/Plex Media Server");
      if (isDir(TestDir)) {
        setString(H.AppSuppDir,"%s/%s",H.UserInfo.HomeDir,"/AppData/Roaming");
      }
    }
    if ( *H.AppSuppDir && isDir(H.AppSuppDir)) {
      // Window PMS server
      setString(H.HostType,"Windows");
      setString(H.AppSuppDir,"%s/%s/AppData/Local",H.UserInfo.HomeDir);
      setString(H.DbDir, "%s/Plex Media Server/Plug-in Support/Databases", H.AppSuppDir);
      setString(H.DbTmp, "%s/dbtmp", H.DbDir);
      setString(H.CacheDir, "%s/Plex Media Server/Cache/PhotoTranscoder", H.AppSuppDir);
      setString(H.PidFile, "%s/Plex Media Server/plexmediaserver.pid", H.AppSuppDir);
      setString(H.LogFile, "%s/DBRepair.log", H.DbDir);

      // Full Database Path Construction
      setString(H.MainDb.Path, "%s/com.plexapp.plugins.library.db", H.DbDir);
      setString(H.BlobsDb.Path, "%s/com.plexapp.plugins.library.blobs.db", H.DbDir);

      H.RootRequired  = false;
      H.HaveStartStop = false;

      // questionable to use TMP this way
      strcpy(H.TmpDir,getenv("TMP"));
      strcpy(H.SysTmp,getenv("TMP"));

      // Good news
      return true;
    }

  }