File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ struct Decompress
131
131
// Clean up the path
132
132
name.erase (name.find_last_not_of (" \t\n\r\f\v\0 " ) + 1 );
133
133
134
+ #if !JUCE_WINDOWS
134
135
// Get file permissions
135
136
fs::perms permissions = fs::perms::none;
136
137
mode_t mode = static_cast <mode_t >(
@@ -147,7 +148,7 @@ struct Decompress
147
148
if (mode & 0004 ) permissions |= fs::perms::others_read;
148
149
if (mode & 0002 ) permissions |= fs::perms::others_write;
149
150
if (mode & 0001 ) permissions |= fs::perms::others_exec;
150
-
151
+ # endif
151
152
// Get file size (octal)
152
153
size_t fileSize = std::strtoull (reinterpret_cast <const char *>(header + 124 ), nullptr , 8 );
153
154
@@ -192,7 +193,9 @@ struct Decompress
192
193
if (typeFlag == ' 5' ) {
193
194
// Directory
194
195
fs::create_directories (outPath);
196
+ #if !JUCE_WINDOWS
195
197
fs::permissions (outPath, permissions);
198
+ #endif
196
199
} else if (typeFlag == ' 0' || typeFlag == ' \0 ' ) {
197
200
// Regular file
198
201
fs::create_directories (outPath.parent_path ());
@@ -212,7 +215,9 @@ struct Decompress
212
215
}
213
216
out.close ();
214
217
218
+ #if !JUCE_WINDOWS
215
219
fs::permissions (outPath, permissions);
220
+ #endif
216
221
}
217
222
} catch (const fs::filesystem_error& e) {
218
223
// Handle filesystem errors
You can’t perform that action at this time.
0 commit comments