-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix #6 and support for delete. #12
base: master
Are you sure you want to change the base?
Conversation
@@ -46,6 +49,8 @@ data class SaveFileInfo(val filePath: String?, val fileData: ByteArray?, val fil | |||
result = 31 * result + fileName.hashCode() | |||
return result | |||
} | |||
|
|||
override fun toString() = "SaveFileInfo(filePath=$filePath fileName=$fileName)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to dump a possibly large binary file into the log.
@@ -139,6 +144,7 @@ fun saveMultipleFiles( | |||
|
|||
val begin = System.nanoTime() | |||
|
|||
destinationSaveFilesInfo.clear() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug mentioned in #6.
@@ -258,7 +259,7 @@ class Utils { | |||
val saveFileNamePrefix: String = | |||
destinationSaveFilesInfo.elementAt(index).saveFileNamePrefix | |||
val documentFileNewFile = outputFolder!!.createFile( | |||
sourceFileMimeType ?: "application/random", saveFileNamePrefix | |||
sourceFileMimeType ?: "application/octet-stream", saveFileNamePrefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no application/random
, this one is the generic format.
@@ -341,7 +348,7 @@ class SaveFileInfo { | |||
/// Required if [fileData] is provided. | |||
final String? fileName; | |||
|
|||
/// Create parameters for the [fileMetaData] method. | |||
/// Create parameters for the [fileSaver] method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a copying typo.
@@ -365,7 +372,7 @@ class SaveFileInfo { | |||
// when using the print statement. | |||
@override | |||
String toString() { | |||
return 'SaveFileInfo{filePath: $filePath, fileData: $fileData, fileName: $fileName}'; | |||
return 'SaveFileInfo{filePath: $filePath, fileName: $fileName}'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to dump a possibly large binary file into the log.
Thanks for the PR and the comments. I will review it soon. |
I'll add a few review comments to describe individual changes.
The major one is adding support for deleting files, that's more or less obvious, copied and modified another command.