Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grinder_files:: copyFile cannot copy permission. #49

Closed
sunglim opened this issue Nov 10, 2014 · 3 comments
Closed

grinder_files:: copyFile cannot copy permission. #49

sunglim opened this issue Nov 10, 2014 · 3 comments

Comments

@sunglim
Copy link
Contributor

sunglim commented Nov 10, 2014

-rwxr-xr-x 1 root root 229 Nov 10 16:38 ex.sh

run `copyFile(new File('./ex.sh'), new Directory('./foo'));

result is

-rw-r--r-- 1 root root 229 Nov 10 16:48 ex.sh

which doesn't have execute permission.

@devoncarew
Copy link
Contributor

Looks like we're copying the bytes ourselves. Perhaps we should use the File.copySync method? Not sure if that preserves permissions.

@sunglim
Copy link
Contributor Author

sunglim commented Dec 16, 2014

I've tried to use File.copySync but File.copySync doesn't fully copy the permission.
sunglim@8a31a26

Perhaps. this is dart bug? then I'll file an issue to dartbug.com
.

ls -alR
.:
total 16
drwxrwxr-x 3 sungguk sungguk 4096 Dec 16 03:52 .
drwxrwxr-x 3 sungguk sungguk 4096 Dec 16 03:50 ..
drwxrwxr-x 2 sungguk sungguk 4096 Dec 16 03:52 targetDir
-rwxrwxrwx 1 sungguk sungguk 133 Dec 16 03:35 test.py

./targetDir:
total 12
drwxrwxr-x 2 sungguk sungguk 4096 Dec 16 03:52 .
drwxrwxr-x 3 sungguk sungguk 4096 Dec 16 03:52 ..
-rwxrwxr-x 1 sungguk sungguk 133 Dec 16 03:52 test.py
.

@devoncarew
Copy link
Contributor

fixed by #56

jcollins-g pushed a commit to jcollins-g/grinder.dart that referenced this issue Feb 12, 2021
Previously, the formatter would get confused if it didn't indent enough
for several levels of expression nesting which later turned out to be
needed by later lines.

This addresses that. It does negatively impact perf (about 3x) but I
hope I can regain some of that in later optimizations.

Fixes google#49, google#66, google#75, google#83, and google#84.

R=pquitslund@google.com

Review URL: https://chromiumcodereview.appspot.com//802513004
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants