diff options
Diffstat (limited to 'drive')
| -rw-r--r-- | drive/import.go | 8 | ||||
| -rw-r--r-- | drive/sync_upload.go | 2 | 
2 files changed, 7 insertions, 3 deletions
| diff --git a/drive/import.go b/drive/import.go index 2ee5f1e..0162aa3 100644 --- a/drive/import.go +++ b/drive/import.go @@ -11,15 +11,19 @@ import (  type ImportArgs struct {  	Out      io.Writer +	Mime     string  	Progress io.Writer  	Path     string  	Parents  []string  }  func (self *Drive) Import(args ImportArgs) error { -	fromMime := getMimeType(args.Path) +	fromMime := args.Mime  	if fromMime == "" { -		return fmt.Errorf("Could not determine mime type of file") +		fromMime = getMimeType(args.Path) +	} +	if fromMime == "" { +		return fmt.Errorf("Could not determine mime type of file, use --mime")  	}  	about, err := self.service.About.Get().Fields("importFormats").Do() diff --git a/drive/sync_upload.go b/drive/sync_upload.go index 261497d..f1e43a4 100644 --- a/drive/sync_upload.go +++ b/drive/sync_upload.go @@ -120,7 +120,7 @@ func (self *Drive) prepareSyncRoot(args UploadSyncArgs) (*drive.File, error) {  	// Ensure that the directory is empty  	if !isEmpty { -		return nil, fmt.Errorf("Root directoy is not empty, the initial sync requires an empty directory") +		return nil, fmt.Errorf("Root directory is not empty, the initial sync requires an empty directory")  	}  	// Update directory with syncRoot property | 
