Skip to content

Commit b485f4b

Browse files
authored
Merge pull request rowanj#224 from ksuther/fix-drag-and-drop
Fix exception when dragging files in the unstaged and staged changes table views
2 parents 832d426 + 003ff38 commit b485f4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Classes/Controllers/PBGitCommitController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,11 +670,11 @@ - (BOOL)tableView:(NSTableView *)tv writeRowsWithIndexes:(NSIndexSet *)rowIndexe
670670
NSArray *files = [controller.arrangedObjects objectsAtIndexes:rowIndexes];
671671
NSURL *workingDirectoryURL = self.repository.workingDirectoryURL;
672672

673-
NSMutableArray<NSURL *> *URLs = [NSMutableArray arrayWithCapacity:rowIndexes.count];
673+
NSMutableArray<NSString *> *paths = [NSMutableArray arrayWithCapacity:rowIndexes.count];
674674
for (PBChangedFile *file in files) {
675-
[URLs addObject:[workingDirectoryURL URLByAppendingPathComponent:file.path]];
675+
[paths addObject:[[workingDirectoryURL URLByAppendingPathComponent:file.path] path]];
676676
}
677-
[pboard writeObjects:URLs];
677+
[pboard setPropertyList:paths forType:NSFilenamesPboardType];
678678

679679
return YES;
680680
}

0 commit comments

Comments
 (0)