Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Persist and reload ProjectManager's jstree #61

Merged
merged 5 commits into from
Jan 11, 2012

Conversation

jasonsanjose
Copy link
Member

No description provided.

@chrisbank
Copy link
Contributor

Reviewing


// Determine depth of the node by counting path separators.
// Children at the root have depth of zero.
// TODO (jasonsj): PATH_SEPARATOR per native OS
Copy link
Contributor

Choose a reason for hiding this comment

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

Are all these in Native File System paths? This seems problematic to use a path separator token here. I think the best would be if this were normalized to file:/// urls, then you could always use this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Does path-utils do that for us?

Copy link
Contributor

Choose a reason for hiding this comment

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

It will work with file URLS and relative URLS. I just started looking at the native file system and I don't know where a good line is for doing this. I wasn't sure if the shell file APIs should always return things as fileUrls or should the NativeFileSystem be responsible for it? My gut tells me the Shell App should be the one converting to/from file APIs because that's the thing that's going to change on each platform but I don't know if you guys have already talked about this and already thought of where to draw that line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Our Entry classes implement the HTML5 filesystem API. The fullPath property is supposed to be an absolute path from the root, prefixed with "/". So we can't use a file URI there. http://dev.w3.org/2009/dap/file-system/pub/FileSystem/#dfn-absolute-path

We can refactor the PATH_SEPARATOR prop based on the file system at a later time. (e.g. Java System.getProperty("file.separator")). S'ok?

Copy link
Contributor

Choose a reason for hiding this comment

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

The start of that section in the link says:
The directory separator is '/', regardless of the directory separator used by the underlying system, if any.

So I think you can just remove the TODO here, and put a note in NativeFileSystem that is should normalize paths the same way.

chrisbank added a commit that referenced this pull request Jan 11, 2012
Persist and reload ProjectManager's jstree
@chrisbank chrisbank merged commit 2fbf233 into master Jan 11, 2012
busykai added a commit to busykai/brackets that referenced this pull request Nov 24, 2013
This version is required to load and run brackets properly on
node-webkit. See requirejs/text#55 for node-specific details.
Summary of changes:
  > rev to 2.0.10
  > Merge pull request adobe#61 from AnSavvides/master
  > Merge pull request adobe#60 from dakota/patch-1
  > rev to 2.0.9
  > Merge pull request adobe#55 from busykai/master
  > Fixes adobe#57 xpcshell: windows FileUtils.File does not like / paths
  > Rev version for 2.0.7
  > Fixes adobe#52, handle non-existent files in node
  > Fixes issue mentioned in comments for requirejs/r.js#221 about Java usage
  > Merge pull request adobe#49 from fsbdev/patch-1
gideonthomas added a commit to gideonthomas/brackets that referenced this pull request Mar 3, 2015
Fix adobe#50 Fixed process-tick error via submodule update
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants