Skip to content

Commit

Permalink
Fixed CS7 fixes that broke install process
Browse files Browse the repository at this point in the history
  • Loading branch information
davestewart committed May 9, 2013
1 parent dd053cd commit 17e4aed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
22 changes: 3 additions & 19 deletions core/jsfl/libraries/file/Folder.jsfl
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,14 @@
{
var uri;
var uris = FLfile.listFolder(this.uri);

//BUG Need to fix UNC paths. If // is passed in, windows doesn't know what to do, the following code fails, castinf files as folders and appending a trailing slash
//BUG Looks like if / are passed after // on windows, the lookup is MUCH slower. \\name\folder\file is much faster than \\name/folder/file

for (var i = 0; i < uris.length; i++)
{
uri = this.uri + encodeURI(uris[i]);
if(uri.length > 260)
{
URI.throwURILengthError(uri);
}
if(FLfile.exists(uri + '/'))
if(FLfile.getAttributes(uri).indexOf('D') > -1)
{
uri += '/';
}
Expand Down Expand Up @@ -191,7 +187,7 @@
{
File.prototype.open.apply(this);
},

/**
* Copy the folder to a new uri
* @param {String} toUri The URI to copy to
Expand Down Expand Up @@ -288,19 +284,7 @@
{
return '[class Folder]';
}

/**
* Alias for fl.browseForFolderURL that appends a trailing slash
* @param {String} prompt An optional user prompt
* @param {Boolean} asPath An optional flag to return a path instead of a URI
* @returns {String} A URI or undefined if no pick
*/
Folder.pick = function(prompt, asPath)
{
var uri = fl.browseForFolderURL(prompt);
uri = uri ? uri.replace(/\/?$/, '/') : uri;
return asPath ? URI.asPath(uri) : uri;
}


// -----------------------------------------------------------------------------------------------------------------------------------------
// register classes with xjsfl
Expand Down
2 changes: 1 addition & 1 deletion core/jsfl/libraries/utils/Utils.jsfl
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@

// create URI
itemURI = folderURI + name;
isFolder = FLfile.exists(folderURI + name + '/');
isFolder = String(FLfile.getAttributes(itemURI)).indexOf('D') !== -1;
if(isFolder)
{
itemURI += '/';
Expand Down
2 changes: 1 addition & 1 deletion core/jsfl/proxies.jsfl
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
for each(var item in items)
{
var uri = folderURI + item;
if(FLfile.exists(uri + '/'))
if(FLfile.getAttributes(uri).indexOf('D') > -1)
{
if( ! filesOnly )
{
Expand Down

0 comments on commit 17e4aed

Please sign in to comment.