diff options
-rw-r--r-- | plugins/vorbis/vcedit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/vorbis/vcedit.c b/plugins/vorbis/vcedit.c index 5709f89c..2f30aeb6 100644 --- a/plugins/vorbis/vcedit.c +++ b/plugins/vorbis/vcedit.c @@ -33,6 +33,7 @@ #include <limits.h> #include <unistd.h> #include <stdbool.h> +#include <sys/stat.h> #include <ogg/ogg.h> #include <deadbeef.h> #include "vcedit.h" @@ -220,6 +221,9 @@ off_t vcedit_write_metadata(DB_FILE *in, const char *fname, int link, const char *lasterror = "file not opened for reading."; goto cleanup; } + struct stat stat_struct; + if (!stat(fname, &stat_struct)) + chmod(outname, stat_struct.st_mode); /* Copy through pages until we reach the right info header */ int codec_serial = 0; |