git-svn-id: svn://db.shs.com.ru/pip@127 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -1035,7 +1035,6 @@ void PIConnection::DevicePool::deviceReaded(PIConnection::DevicePool::DeviceData
|
|||||||
|
|
||||||
void PIConnection::splitFullPathWithMode(PIString fpwm, PIString * full_path, PIIODevice::DeviceMode * mode) {
|
void PIConnection::splitFullPathWithMode(PIString fpwm, PIString * full_path, PIIODevice::DeviceMode * mode) {
|
||||||
PIIODevice::DeviceMode dm = PIIODevice::ReadWrite;
|
PIIODevice::DeviceMode dm = PIIODevice::ReadWrite;
|
||||||
piCout << "SPLIT" << fpwm;
|
|
||||||
if (fpwm.find("(") > 0 && fpwm.find(")") > 0) {
|
if (fpwm.find("(") > 0 && fpwm.find(")") > 0) {
|
||||||
PIString dms(fpwm.right(fpwm.length() - fpwm.find("(")).takeRange("(", ")").trim().toLowerCase().removeAll(" "));
|
PIString dms(fpwm.right(fpwm.length() - fpwm.find("(")).takeRange("(", ")").trim().toLowerCase().removeAll(" "));
|
||||||
//piCout << dms;
|
//piCout << dms;
|
||||||
@@ -1045,7 +1044,6 @@ void PIConnection::splitFullPathWithMode(PIString fpwm, PIString * full_path, PI
|
|||||||
dm = PIIODevice::WriteOnly;
|
dm = PIIODevice::WriteOnly;
|
||||||
fpwm.cutRight(fpwm.length() - fpwm.find("(")).trim();
|
fpwm.cutRight(fpwm.length() - fpwm.find("(")).trim();
|
||||||
}
|
}
|
||||||
piCout << "SPLIT" << fpwm;
|
|
||||||
if (full_path) *full_path = fpwm;
|
if (full_path) *full_path = fpwm;
|
||||||
if (mode) *mode = dm;
|
if (mode) *mode = dm;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "piiodevice.h"
|
#include "piiodevice.h"
|
||||||
#include "piconfig.h"
|
#include "piconfig.h"
|
||||||
|
#include "piconnection.h"
|
||||||
|
|
||||||
|
|
||||||
/*! \class PIIODevice
|
/*! \class PIIODevice
|
||||||
@@ -306,10 +307,14 @@ PIString PIIODevice::normalizeFullPath(const PIString & full_path) {
|
|||||||
if (!ret.isEmpty())
|
if (!ret.isEmpty())
|
||||||
return ret;
|
return ret;
|
||||||
//piCout << "normalizeFullPath" << full_path;
|
//piCout << "normalizeFullPath" << full_path;
|
||||||
PIIODevice * d = createFromFullPath(full_path);
|
PIString fp; PIIODevice::DeviceMode md;
|
||||||
|
PIConnection::splitFullPathWithMode(full_path, &fp, &md);
|
||||||
|
PIIODevice * d = createFromFullPath(fp);
|
||||||
//piCout << "normalizeFullPath" << d;
|
//piCout << "normalizeFullPath" << d;
|
||||||
if (d == 0) return PIString();
|
if (d == 0) return PIString();
|
||||||
ret = d->constructFullPath();
|
ret = d->constructFullPath();
|
||||||
|
if (md == PIIODevice::ReadOnly) ret += " (ro)";
|
||||||
|
if (md == PIIODevice::WriteOnly) ret += " (wo)";
|
||||||
delete d;
|
delete d;
|
||||||
nfp_cache[full_path] = ret;
|
nfp_cache[full_path] = ret;
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user