File tree Expand file tree Collapse file tree 4 files changed +26
-2
lines changed
Expand file tree Collapse file tree 4 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 1+ ## v2.0.5
2+ - FIX: Display sync folder path
3+
14## v2.0.4
25 - FIX: getAllAccounts didn't have a fallback for the initial loading of the extension
36
Original file line number Diff line number Diff line change 22 "manifest_version" : 2 ,
33 "name" : " Floccus (nextcloud Sync)" ,
44 "short_name" : " Floccus" ,
5- "version" : " 2.0.4 " ,
5+ "version" : " 2.0.5 " ,
66 "description" : " Sync your browser with nextcloud (currently only bookmarks; more to come)" ,
77 "icons" : {
88 "48" : " icons/logo.png"
Original file line number Diff line number Diff line change 11{
22 "name" : " floccus" ,
3- "version" : " 2.0.4 " ,
3+ "version" : " 2.0.5 " ,
44 "description" : " The goal of this project is to build a browser extension that syncs your browser data with [OwnCloud](http://owncloud.org)." ,
55 "main" : " index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -163,6 +163,27 @@ export default class Tree {
163163 return recurse ( tree )
164164 }
165165
166+ static async getPathFromLocalId ( localId , ancestors , relativeToRoot ) {
167+ ancestors = ancestors || await Tree . getIdPathFromLocalId ( localId )
168+
169+ if ( relativeToRoot ) {
170+ ancestors = ancestors . slice ( ancestors . indexOf ( relativeToRoot ) + 1 )
171+ }
172+
173+ return '/' + ( await Promise . all (
174+ ancestors
175+ . map ( async ancestor => {
176+ try {
177+ let bms = await browser . bookmarks . getSubTree ( ancestor )
178+ let bm = bms [ 0 ]
179+ return bm . title . replace ( / [ / ] / g, '\\/' )
180+ } catch ( e ) {
181+ return 'Error!'
182+ }
183+ } )
184+ ) ) . join ( '/' )
185+ }
186+
166187 async mkdirpPath ( path ) {
167188 const allAccounts = await Account . getAllAccounts ( )
168189 return Tree . mkdirpPath ( path , this . rootId , allAccounts )
You can’t perform that action at this time.
0 commit comments