Skip to content

Commit

Permalink
Merge pull request #1902 in ITERATE/cyberduck from bugfix/TRAC-10803 …
Browse files Browse the repository at this point in the history
…to master

* commit '3d90b80f4548a9b18c33925c4b9177556efd06b5':
  Make sure target has not same reference of attributes. Fix #10803.
  • Loading branch information
automerge committed Dec 12, 2019
2 parents 6e7dae1 + 3d90b80 commit 014de5c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Expand Up @@ -2938,7 +2938,7 @@ public void paste(final ID sender) {
final Map<Path, Path> files = new HashMap<Path, Path>();
final Path parent = workdir;
for(final Path next : pasteboard) {
Path renamed = new Path(parent, next.getName(), next.getType(), next.attributes());
Path renamed = new Path(parent, next.getName(), next.getType(), new PathAttributes(next.attributes()));
files.put(next, renamed);
}
pasteboard.clear();
Expand Down
Expand Up @@ -38,6 +38,7 @@
import ch.cyberduck.core.LocalFactory;
import ch.cyberduck.core.LocaleFactory;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.PathAttributes;
import ch.cyberduck.core.Permission;
import ch.cyberduck.core.Scheme;
import ch.cyberduck.core.UserDateFormatterFactory;
Expand Down Expand Up @@ -403,7 +404,7 @@ public boolean acceptDrop(final NSTableView view, final Path destination, final
}
final Map<Path, Path> files = new HashMap<Path, Path>();
for(Path next : pasteboard) {
final Path renamed = new Path(destination, next.getName(), next.getType(), next.attributes().withVersionId(null));
final Path renamed = new Path(destination, next.getName(), next.getType(), new PathAttributes(next.attributes()).withVersionId(null));
files.put(next, renamed);
}
if(pasteboard.getBookmark().compareTo(controller.getSession().getHost()) != 0) {
Expand Down
Expand Up @@ -1062,7 +1062,7 @@ private void View_BrowserModelDropped(ModelDropEventArgs dropargs)
IDictionary<Path, Path> files = new Dictionary<Path, Path>();
foreach (Path next in dropargs.SourceModels)
{
Path renamed = new Path(destination, next.getName(), next.getType(), next.attributes().withVersionId(null));
Path renamed = new Path(destination, next.getName(), next.getType(), new PathAttributes(next.attributes()).withVersionId(null));
files.Add(next, renamed);
}
if (files.Count > 0)
Expand Down Expand Up @@ -1587,7 +1587,7 @@ private void View_Paste()
for (int i = 0; i < _pasteboard.size(); i++)
{
Path next = (Path) _pasteboard.get(i);
Path renamed = new Path(parent, next.getName(), next.getType(), next.attributes());
Path renamed = new Path(parent, next.getName(), next.getType(), new PathAttributes(next.attributes()));
files.Add(next, renamed);
}
_pasteboard.clear();
Expand Down

0 comments on commit 014de5c

Please sign in to comment.