Skip to content

Commit

Permalink
#5 Исправлена ошибка с константой разделителя директорий
Browse files Browse the repository at this point in the history
  • Loading branch information
parshikov committed May 10, 2016
1 parent 3095b6d commit 4d1f5b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion FileMatchFinder/Classes/TorrentReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static Torrent ReadTorrent(string filename)
string fullPath = name;
foreach (BString partOfPath in filePaths)
{
fullPath += Path.PathSeparator + partOfPath.Value;
fullPath += Path.DirectorySeparatorChar + partOfPath.Value;
}
files.Add(new LostFile(fullPath, length, begin));

Expand Down
2 changes: 1 addition & 1 deletion FileMatchFinder/Classes/TreeWalker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static void FindFiles(Torrent torrent, List<FileInfo> files, string desti

// Все проверки пройдены. перед нами искомый файл
// Перемещаем его
FileInfo fileToMove = new FileInfo(destinationPath + Path.PathSeparator + fileInTorrent.Name);
FileInfo fileToMove = new FileInfo(destinationPath + Path.DirectorySeparatorChar + fileInTorrent.Name);

if (!Directory.Exists(fileToMove.DirectoryName))
Directory.CreateDirectory(fileToMove.DirectoryName);
Expand Down

0 comments on commit 4d1f5b6

Please sign in to comment.