rubyecm2cue 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb02bcf378557202142922ce52c9e67fa4b22f51
4
- data.tar.gz: 69835ec78a4db990c4e4018c855ca84d236b058c
3
+ metadata.gz: 7576117a3a8de31b371769c5c66f6392ecf288a7
4
+ data.tar.gz: 0bd1f059273a08c35b8dbe9a0d117ab3e78ee62b
5
5
  SHA512:
6
- metadata.gz: 685b9e1264509097f1c45d43e4725050e6eb12534ba78505f5fe857e54f77a51021fbe1421bdc13f5f43a560202c68072114e7a1e8b87fdfa90b249aad3a8b7c
7
- data.tar.gz: 7f6bddba21c966217e09533f6c20f1cf8dd27d875c523d9b04de6fb45240f6a4c32bb8c2eb3fe9398576be8e92a979d7344d4e8a0b009399b40a0c4b833cbb1c
6
+ metadata.gz: ec2330dcb8adf72b0a2cbcfe769132f56c2f51033b9096e8ac6600ec3edfc4ce0d616f893a572a81a32170f6fcccbf2d1660066ad65563577c2f74564ba9f0d6
7
+ data.tar.gz: 8ef66937e065b634c6028f4f412b45a0ab91631a86062bfb959b80568701b4f1c8f2d6be6c93512c17d73acce200bb34ac1f2eb041421213f8a07dd7b3901e99
@@ -24,9 +24,11 @@ VALUE method_process(VALUE self, VALUE arg_path) {
24
24
 
25
25
  if(strlen(infilename) < 5) {
26
26
  strcpy(retValue, "filename is too short");
27
+ return rb_str_new_cstr(retValue);
27
28
  }
28
29
  if(strcasecmp(infilename + strlen(infilename) - 4, ".ecm")) {
29
30
  strcpy(retValue, "filename must end in .ecm");
31
+ return rb_str_new_cstr(retValue);
30
32
  }
31
33
 
32
34
  outfilename = malloc(strlen(infilename) - 3);
@@ -40,11 +42,13 @@ VALUE method_process(VALUE self, VALUE arg_path) {
40
42
  fin = fopen(infilename, "rb");
41
43
  if(!fin) {
42
44
  strcpy(retValue, "Cannot open file");
45
+ return rb_str_new_cstr(retValue);
43
46
  }
44
47
  fout = fopen(outfilename, "wb");
45
48
  if(!fout) {
46
49
  strcpy(retValue, "Cannot write file");
47
50
  fclose(fin);
51
+ return rb_str_new_cstr(retValue);
48
52
  }
49
53
 
50
54
  unecm_ret = unecmify(fin, fout);
@@ -54,12 +58,14 @@ VALUE method_process(VALUE self, VALUE arg_path) {
54
58
 
55
59
  if(unecm_ret != 0) {
56
60
  strcpy(retValue, "Cannot decode file");
61
+ return rb_str_new_cstr(retValue);
57
62
  }
58
63
 
59
64
  strcpy(oldfilename, outfilename);
60
65
  cue_file = fopen(strcat(outfilename, ".cue"), "w");
61
66
  if(!cue_file) {
62
67
  strcpy(retValue, "Cannot write cue file");
68
+ return rb_str_new_cstr(retValue);
63
69
  }
64
70
  fprintf(cue_file, "FILE \"%s\" BINARY\n", oldfilename);
65
71
  fprintf(cue_file, "\tTRACK 01 MODE1/2352\n");
@@ -67,6 +73,5 @@ VALUE method_process(VALUE self, VALUE arg_path) {
67
73
  fclose(cue_file);
68
74
 
69
75
  strcpy(retValue, outfilename);
70
-
71
76
  return rb_str_new_cstr(retValue);
72
77
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyecm2cue
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ferdinand E. Silva