Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serverPath column to db metadata table #12033

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions src/libsync/syncfileitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ SyncFileItemPtr SyncFileItem::fromSyncJournalFileRecord(const SyncJournalFileRec
item->_remotePerm = rec._remotePerm;
item->_serverHasIgnoredFiles = rec._serverHasIgnoredFiles;
item->_checksumHeader = rec._checksumHeader;
item->_remoteName = QString::fromUtf8(rec._serverPath);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we have the same name remoteName for DB as well? Just to be consistent ...

return item;
}

Expand Down
10 changes: 9 additions & 1 deletion src/libsync/syncfileitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,22 @@ class OWNCLOUDSYNC_EXPORT SyncFileItem
QString localName() const { return _localName; }
void setLocalName(const QString &newName) { _localName = newName; }

QString remoteName() const { return _remoteName.isEmpty() ? _localName : _remoteName; }
QString rawRemoteName() const { return _remoteName; }

private:
/** The syncfolder-relative filesystem path that the operation is about
*
* For rename operation this is the rename source and the target is in _renameTarget.
*/
QString _localName;

// QString _remoteName;
/**
* The remote file name, when the local unicode normalization differs from the remote
* normalization. When this string is empty, (and the local name is not), the normalization is
* the same, and the local name can be used.
*/
QString _remoteName;

public:
/** for renames: the name _file should be renamed to
Expand Down