Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove WriteFile and move it into CopyFile #204

Merged
merged 5 commits into from
Dec 13, 2021
Merged

Remove WriteFile and move it into CopyFile #204

merged 5 commits into from
Dec 13, 2021

Commits on Dec 12, 2021

  1. Configuration menu
    Copy the full SHA
    18aadcc View commit details
    Browse the repository at this point in the history
  2. Removed need for a temporary file

    - I've removed the WriteFile and put it into CopyFile.
    
    - It still uses filesytem.Split but just to get the directory name to create it if it doesn't exist.
    
    - It opens the file with os.OpenFile and set the file permissions there instead of after copying.
    
    - It removes the file if io.Copy returns an error.
    
    - It doesn't need error handling on toFile.Close as it only returns an error if it's called multiple times.
    bolshoytoster committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    a075994 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    badc5e7 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2021

  1. Revert merging CopyFile and WriteFile.

    The only change is changing path.Split -> filepath.Split
    bolshoytoster committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    5b0f644 View commit details
    Browse the repository at this point in the history
  2. Fix imports

    jaredpalmer committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    3f89cba View commit details
    Browse the repository at this point in the history