attempting to fix the symlink issue being the wrong direction, fixing the log folder not existing error

This commit is contained in:
2018-01-19 21:49:19 -05:00
parent c4b86bcf1d
commit aa9082f598
5 changed files with 34 additions and 13 deletions

View File

@@ -67,7 +67,9 @@ func MoveAndLeaveSymlink(config FullClientSettings, singleTorrent *torrent.Torre
Logger.WithFields(logrus.Fields{"Old File Path": oldFilePath, "New File Path": newFilePath, "bytesWritten": bytesWritten}).Info("Windows Torrent Copy Completed")
notifyUser(tStorage, config, singleTorrent, db)
} else {
err := os.Symlink(oldFilePath, newFilePath) //For all other OS's create a symlink
folderCopy.Copy(oldFilePath, newFilePath)
os.RemoveAll(oldFilePath)
err := os.Symlink(newFilePath, oldFilePath) //For all other OS's create a symlink
if err != nil {
Logger.WithFields(logrus.Fields{"Old File Path": oldFilePath, "New File Path": newFilePath, "error": err}).Error("Error creating symlink")
return