"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/common/vfs.cpp" between
ownCloud-2.9.0.5150.tar.xz and ownCloud-2.9.1.5500.tar.xz

About: ownCloud Client (formerly "mirall") is a tool to synchronize files from ownCloud Server with your desktop client. It uses OCSync as its syncing backend.

vfs.cpp  (ownCloud-2.9.0.5150.tar.xz):vfs.cpp  (ownCloud-2.9.1.5500.tar.xz)
skipping to change at line 37 skipping to change at line 37
#include <QPluginLoader> #include <QPluginLoader>
#include <QLoggingCategory> #include <QLoggingCategory>
using namespace OCC; using namespace OCC;
Vfs::Vfs(QObject* parent) Vfs::Vfs(QObject* parent)
: QObject(parent) : QObject(parent)
{ {
} }
QString Vfs::underlyingFileName(const QString &fileName) const
{
return fileName;
}
Vfs::~Vfs() = default; Vfs::~Vfs() = default;
QString Vfs::modeToString(Mode mode) QString Vfs::modeToString(Mode mode)
{ {
// Note: Strings are used for config and must be stable // Note: Strings are used for config and must be stable
switch (mode) { switch (mode) {
case Off: case Off:
return QStringLiteral("off"); return QStringLiteral("off");
case WithSuffix: case WithSuffix:
return QStringLiteral("suffix"); return QStringLiteral("suffix");
skipping to change at line 66 skipping to change at line 71
if (str == QLatin1String("off")) { if (str == QLatin1String("off")) {
return Off; return Off;
} else if (str == QLatin1String("suffix")) { } else if (str == QLatin1String("suffix")) {
return WithSuffix; return WithSuffix;
} else if (str == QLatin1String("wincfapi")) { } else if (str == QLatin1String("wincfapi")) {
return WindowsCfApi; return WindowsCfApi;
} }
return {}; return {};
} }
Result<void, QString> Vfs::checkAvailability(const QString &path) Result<void, QString> Vfs::checkAvailability(const QString &path, Vfs::Mode mode )
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
const auto mode = bestAvailableVfsMode();
if (mode == Mode::WindowsCfApi) { if (mode == Mode::WindowsCfApi) {
const auto info = QFileInfo(path); const auto info = QFileInfo(path);
if (QDir(info.canonicalFilePath()).isRoot()) { if (QDir(info.canonicalFilePath()).isRoot()) {
return tr("The Virtual filesystem feature does not support a drive a s sync root"); return tr("The Virtual filesystem feature does not support a drive a s sync root");
} }
const auto fs = FileSystem::fileSystemForPath(info.absoluteFilePath()); const auto fs = FileSystem::fileSystemForPath(info.absoluteFilePath());
if (fs != QLatin1String("NTFS")) { if (fs != QLatin1String("NTFS")) {
return tr("The Virtual filesystem feature requires a NTFS file syste m, %1 is using %2").arg(path, fs); return tr("The Virtual filesystem feature requires a NTFS file syste m, %1 is using %2").arg(path, fs);
} }
const auto type = GetDriveTypeW(reinterpret_cast<const wchar_t *>(QDir:: toNativeSeparators(info.absoluteFilePath().mid(0, 3)).utf16())); const auto type = GetDriveTypeW(reinterpret_cast<const wchar_t *>(QDir:: toNativeSeparators(info.absoluteFilePath().mid(0, 3)).utf16()));
if (type == DRIVE_REMOTE) { if (type == DRIVE_REMOTE) {
return tr("The Virtual filesystem feature is not supported on networ k drives"); return tr("The Virtual filesystem feature is not supported on networ k drives");
} }
} }
#else #else
Q_UNUSED(mode);
Q_UNUSED(path); Q_UNUSED(path);
#endif #endif
return {}; return {};
} }
void Vfs::start(const VfsSetupParams &params) void Vfs::start(const VfsSetupParams &params)
{ {
_setupParams = params; _setupParams = params;
startImpl(params); startImpl(params);
} }
 End of changes. 4 change blocks. 
2 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)