mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-18 08:49:39 -04:00
gzip: use success status when file already has compressed suffix
This matches the behavior of GNU gzip.
This commit is contained in:
parent
b620773954
commit
ed923c45d4
@ -384,8 +384,7 @@ compress_file(struct libdeflate_compressor *compressor, const tchar *path,
|
||||
if (!options->force && has_suffix(path, options->suffix)) {
|
||||
msg("%"TS": already has %"TS" suffix -- skipping",
|
||||
path, options->suffix);
|
||||
ret = -2;
|
||||
goto out;
|
||||
return 0;
|
||||
}
|
||||
path_nchars = tstrlen(path);
|
||||
suffix_nchars = tstrlen(options->suffix);
|
||||
@ -439,7 +438,6 @@ out_close_in:
|
||||
tunlink(path);
|
||||
out_free_newpath:
|
||||
free(newpath);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user