{"action":"opened","issue":{"url":"https://api.github.com/repos/jprichardson/node-fs-extra/issues/328","repository_url":"https://api.github.com/repos/jprichardson/node-fs-extra","labels_url":"https://api.github.com/repos/jprichardson/node-fs-extra/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/jprichardson/node-fs-extra/issues/328/comments","events_url":"https://api.github.com/repos/jprichardson/node-fs-extra/issues/328/events","html_url":"https://github.com/jprichardson/node-fs-extra/issues/328","id":196830910,"number":328,"title":"Copying files currupts","user":{"login":"mfgabriel92","id":22737068,"avatar_url":"https://avatars.githubusercontent.com/u/22737068?v=3","gravatar_id":"","url":"https://api.github.com/users/mfgabriel92","html_url":"https://github.com/mfgabriel92","followers_url":"https://api.github.com/users/mfgabriel92/followers","following_url":"https://api.github.com/users/mfgabriel92/following{/other_user}","gists_url":"https://api.github.com/users/mfgabriel92/gists{/gist_id}","starred_url":"https://api.github.com/users/mfgabriel92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfgabriel92/subscriptions","organizations_url":"https://api.github.com/users/mfgabriel92/orgs","repos_url":"https://api.github.com/users/mfgabriel92/repos","events_url":"https://api.github.com/users/mfgabriel92/events{/privacy}","received_events_url":"https://api.github.com/users/mfgabriel92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-21T02:29:55Z","updated_at":"2016-12-21T02:29:55Z","closed_at":null,"body":"Hi,\r\n\r\nI am using AdonisJS as my MVC framework and I had issues using their [`move()`](https://github.com/adonisjs/adonis-framework/blob/cb3d938eab63e21dc10bbb7facf58f87cdc5c923/src/File/index.js#L156) method. They use `fs`, so I decided to look for something else. `fs-extra` seemed nice, since it seems to be an improvement of `fs`, but in the end, the same issue happens: after copying, the file is corrupted. Here's my code:\r\n\r\n```\r\nfse.ensureDir(publicPath, (error) => {\r\n  if (error) {\r\n    throw new HttpException(error, HTTPResponse.STATUS_INTERNAL_SERVER_ERROR);\r\n  }\r\n});\r\n\r\nfse.copy(imageFile.tmpPath(), fullPath, (error) => {\r\n  if (error) {\r\n    throw new HttpException(error, HTTPResponse.STATUS_INTERNAL_SERVER_ERROR);\r\n  }\r\n});\r\n```\r\n\r\nThe message is shows when opening the copied file is:\r\n\r\n>Error interpreting JPEG image file (Not a JPEG file: starts with 0xef 0xbf)\r\n\r\nNo clue what's this, please, suggestions?"}}
{"actor":{"display_login":"mfgabriel92"}}