You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2018/11/07 11:18:42 UTC
[Bug 62890] New: Sync task doesn't copy a file which has different
upper-lower case letters
https://bz.apache.org/bugzilla/show_bug.cgi?id=62890
Bug ID: 62890
Summary: Sync task doesn't copy a file which has different
upper-lower case letters
Product: Ant
Version: unspecified
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: Core tasks
Assignee: notifications@ant.apache.org
Reporter: Roi_BenBasat@amat.com
Target Milestone: ---
Given source file 'mysource\F.txt' and destination file 'mydest\f.txt', sync
task deletes f.txt from destination but doesn't copy F.txt from source.
For example:
<sync todir="mysource"
includeEmptyDirs="true"
verbose="true"
overwrite="false"
>
<fileset dir="mydest"/>
</sync>
We end up with empty dir 'mydest'
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62890] Sync task doesn't copy a file which has different
upper-lower case letters
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62890
--- Comment #4 from Jaikiran Pai <ja...@apache.org> ---
I have pushed a couple of commits to our master branch upstream, which I
believe should fix this. We have a nightly build[1] which you can try if you
would like to and give feedback, before this is released in 1.10.6.
[1]
https://builds.apache.org/view/A/view/Ant/job/Ant_Nightly/lastSuccessfulBuild/artifact/distribution/binaries/
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62890] Sync task doesn't copy a file which has different
upper-lower case letters
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62890
--- Comment #3 from Jaikiran Pai <ja...@apache.org> ---
Sorry, I didn't fully explain the other part of this issue.
It so happens that the other part of the code within this task, which is meant
to see if a file needs to be copied to dest directory, uses the underlying
java.io/java.nio File APIs to decide if a particular file exists in the dest
directory. Those APIs correctly take into account the underlying filesystem and
return back saying that the destination directory already contains that file
and as a result we decide _not_ to consider it for copying into the dest
directory.
There's also the case of "overwrite" flag, which you would expect to work if
you set to "true", but that too ends up triggering this bug in a slightly
different way because of file name case related checks. I won't get into those
details much, since ultimately this boils down to a bug in how we deal with the
case sensitivity.
> Is it possible to fix it?
This surely is a bug and we need to fix it.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62890] Sync task doesn't copy a file which has different
upper-lower case letters
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62890
Jaikiran Pai <ja...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |1.10.6
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jaikiran Pai <ja...@apache.org> ---
Our automated tests have passed with this change. Marking this as resolved.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62890] Sync task doesn't copy a file which has different
upper-lower case letters
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62890
Jaikiran Pai <ja...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unspecified |1.10.5
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62890] Sync task doesn't copy a file which has different
upper-lower case letters
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62890
--- Comment #2 from Roi_BenBasat@amat.com ---
Thanks for your quick answer.
Its ok about the deletion but what about the copy of F.txt to dest?
At the end, the expected result of sync task in this case should be that dest
is mirror of source but it ends up differently..
Is it possible to fix it?
Thanks.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 62890] Sync task doesn't copy a file which has different
upper-lower case letters
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62890
Jaikiran Pai <ja...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #1 from Jaikiran Pai <ja...@apache.org> ---
It appears that while using a DirectoryScanner to identity files that are
orphaned and need to be deleted from the destination directory, we do not take
into account filesystem case sensitivity and neither do we allow that to be
configured. Right now, it defaults to the file system being considered as case
sensitive while checking for files to be deleted and as a result, the f.txt is
considered _not_ the same as F.txt (even on a case insensitive file system) and
end up deleting it.
--
You are receiving this mail because:
You are the assignee for the bug.