Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions src/lib/app/RvPackage/PackageManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <string_view>
#include <iostream>

#include <QProcess>
#include <QRegularExpression>

namespace
Expand Down Expand Up @@ -684,24 +685,22 @@ namespace Rv

if (fbio)
{
string makeFBIO = TwkApp::Bundle::mainBundle()->executableFile("makeFBIOformats");
QFileInfo info(outfilename.c_str());
QString dir = info.dir().absolutePath();
string cmd = makeFBIO;
cmd += " ";
cmd += dir.toUtf8().constData();

if (system(cmd.c_str()) == -1)
//
// Close the plugin first so makeFBIOformats sees all of
// it, and run it without a shell: the support directory
// can contain spaces ("Application Support") or shell
// metacharacters.
//

outfile.close();

const QString makeFBIO = QString::fromStdString(TwkApp::Bundle::mainBundle()->executableFile("makeFBIOformats"));
const QString dir = QFileInfo(QString::fromUtf8(outfilename.c_str())).dir().absolutePath();

if (QProcess::execute(makeFBIO, QStringList() << dir) < 0)
{
cerr << "ERROR: executing command " << cmd << endl;
cerr << "ERROR: executing command " << makeFBIO.toStdString() << " " << dir.toStdString() << endl;
}

// QProcess process;
// QStringList args;
// args.push_back(dir);
// args.push_back(dir);
// process.start(makeFBIO.c_str(), args);
// process.waitForFinished();
}
}

Expand Down
11 changes: 8 additions & 3 deletions src/plugins/rv-packages/rvnuke/rvNuke.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#
from __future__ import print_function

import ast
import nuke
import nukescripts
import os
Expand Down Expand Up @@ -1033,9 +1034,13 @@ def updateFromDisk(self):

prefsFileName = self.prefsPath()
if os.path.exists(prefsFileName):
f = open(prefsFileName)
newDict = eval(f.read())
f.close()
# saveToDisk writes str(dict); read it back without running it as code.
try:
with open(prefsFileName) as f:
newDict = ast.literal_eval(f.read())
except (OSError, SyntaxError, ValueError) as e:
log(" can't read prefs '%s': %s" % (prefsFileName, e))
newDict = {}

for k in newDict:
if k in self.prefs:
Expand Down
Loading