[jira] [Updated] (CB-7602) isCopyOnItself check returns invalid result when moving directory

2014-10-09 Thread Tom Good (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom Good updated CB-7602:
-
Priority: Major  (was: Minor)

> isCopyOnItself check returns invalid result when moving directory
> -
>
> Key: CB-7602
> URL: https://issues.apache.org/jira/browse/CB-7602
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Android, Plugin File
>Affects Versions: 3.5.0
>Reporter: Tom Good
>  Labels: copyTo, moveTo
>
> When using moveTo to move a directory the isCopyOnItself check fails if the 
> directory name starts the same but is different.  Example:
> Source:
> /storage/emulated/0/GalileoMobile
> Destination:
> /storage/emulated/0/GalileoMobileBackup/GalileoMobile
> The issue is with the indexof check looking for any slash following the 
> partial match.
> Existing Line 305 of LocalFileSystem.java:
> if (dest.startsWith(src) && dest.indexOf(File.separator, src.length() 
> - 1) != -1) {
> Something like this should work:
>   if (dest.equals(src) || dest.startsWith(src + File.separator) ) {
> This would also occur with copies.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-7602) isCopyOnItself check returns invalid result when moving directory

2014-09-19 Thread Tom Good (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom Good updated CB-7602:
-
Summary: isCopyOnItself check returns invalid result when moving directory  
(was: isCopyOnItself check fails when moving directory)

> isCopyOnItself check returns invalid result when moving directory
> -
>
> Key: CB-7602
> URL: https://issues.apache.org/jira/browse/CB-7602
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Android, Plugin File
>Affects Versions: 3.5.0
>Reporter: Tom Good
>Priority: Minor
>  Labels: copyTo, moveTo
>
> When using moveTo to move a directory the isCopyOnItself check fails if the 
> directory name starts the same but is different.  Example:
> Source:
> /storage/emulated/0/GalileoMobile
> Destination:
> /storage/emulated/0/GalileoMobileBackup/GalileoMobile
> The issue is with the indexof check looking for any slash following the 
> partial match.
> Existing Line 305 of LocalFileSystem.java:
> if (dest.startsWith(src) && dest.indexOf(File.separator, src.length() 
> - 1) != -1) {
> Something like this should work:
>   if (dest.equals(src) || dest.startsWith(src + File.separator) ) {
> This would also occur with copies.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)