Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelklehr committed Apr 2, 2018
2 parents 74331e1 + 244ffc3 commit 0da9c70
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v2.0.5
- FIX: Display sync folder path

## v2.0.4
- FIX: getAllAccounts didn't have a fallback for the initial loading of the extension

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Floccus (nextcloud Sync)",
"short_name": "Floccus",
"version": "2.0.4",
"version": "2.0.5",
"description": "Sync your browser with nextcloud (currently only bookmarks; more to come)",
"icons": {
"48": "icons/logo.png"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "floccus",
"version": "2.0.4",
"version": "2.0.5",
"description": "The goal of this project is to build a browser extension that syncs your browser data with [OwnCloud](http://owncloud.org).",
"main": "index.js",
"scripts": {
Expand Down
21 changes: 21 additions & 0 deletions src/lib/Tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,27 @@ export default class Tree {
return recurse(tree)
}

static async getPathFromLocalId (localId, ancestors, relativeToRoot) {
ancestors = ancestors || await Tree.getIdPathFromLocalId(localId)

if (relativeToRoot) {
ancestors = ancestors.slice(ancestors.indexOf(relativeToRoot) + 1)
}

return '/' + (await Promise.all(
ancestors
.map(async ancestor => {
try {
let bms = await browser.bookmarks.getSubTree(ancestor)
let bm = bms[0]
return bm.title.replace(/[/]/g, '\\/')
} catch (e) {
return 'Error!'
}
})
)).join('/')
}

async mkdirpPath (path) {
const allAccounts = await Account.getAllAccounts()
return Tree.mkdirpPath(path, this.rootId, allAccounts)
Expand Down

2 comments on commit 0da9c70

@SomePoorBastard
Copy link

Choose a reason for hiding this comment

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

Was going to write up a bug report for 2.0.3, then saw that there were three different releases. 0.o is it Christmas? Props sir; props 👏

@marcelklehr
Copy link
Member Author

Choose a reason for hiding this comment

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

It's easter :D Thanks :)

Please sign in to comment.