.replace(FileUtils.toForwardSlashedPath(Global.getFileManager().getResDirPath()), "");
pos = guid.lastIndexOf('.');
if (pos > 0)
guid = guid.substring(0,pos);
if (fd.exec() != 0 && fd.selectedFiles().size() > 0) {
name = name.replace('\\', '/');
Resource resBinary = conn.getNoteTable().noteResourceTable.getNoteResource(guid, true);
QFile saveFile = new QFile(fd.selectedFiles().get(0));
QFile.OpenMode mode = new QFile.OpenMode();
mode.set(QFile.OpenModeFlag.WriteOnly);